aboutsummaryrefslogtreecommitdiff
path: root/tests/no_exception_throw_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/no_exception_throw_tests.cpp')
-rw-r--r--tests/no_exception_throw_tests.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/no_exception_throw_tests.cpp b/tests/no_exception_throw_tests.cpp
index e9f4dac..b28ad00 100644
--- a/tests/no_exception_throw_tests.cpp
+++ b/tests/no_exception_throw_tests.cpp
@@ -14,20 +14,17 @@
//
///////////////////////////////////////////////////////////////////////////////
-#include <cstdlib> // for std::exit
-#include <gsl/gsl_util> // for narrow
+#include <cstdlib> // for std::exit
#include <gsl/gsl_assert> // for get_terminate
+#include <gsl/gsl_util> // for narrow
int narrow_no_throw()
{
const long long bigNumber = 0x0fffffffffffffff;
- return gsl::narrow<int>(bigNumber);
+ return gsl::narrow<int>(bigNumber);
}
-void test_terminate()
-{
- std::exit(0);
-}
+[[noreturn]] void test_terminate() { std::exit(0); }
void setup_termination_handler() noexcept
{
@@ -43,7 +40,6 @@ void setup_termination_handler() noexcept
#endif
}
-
int main()
{
setup_termination_handler();