aboutsummaryrefslogtreecommitdiff
path: root/tests/no_exception_ensure_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/no_exception_ensure_tests.cpp')
-rw-r--r--tests/no_exception_ensure_tests.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/no_exception_ensure_tests.cpp b/tests/no_exception_ensure_tests.cpp
index 3a7f007..b1ae15b 100644
--- a/tests/no_exception_ensure_tests.cpp
+++ b/tests/no_exception_ensure_tests.cpp
@@ -14,21 +14,17 @@
//
///////////////////////////////////////////////////////////////////////////////
-#include <cstdlib> // for std::exit
-#include <gsl/span> // for span
+#include <cstdlib> // for std::exit
+#include <gsl/span> // for span
int operator_subscript_no_throw() noexcept
{
- int arr[10];
- const gsl::span<int> sp { arr };
+ int arr[10];
+ const gsl::span<int> sp{arr};
return sp[11];
}
-
-void test_terminate()
-{
- std::exit(0);
-}
+[[noreturn]] void test_terminate() { std::exit(0); }
void setup_termination_handler() noexcept
{
@@ -44,7 +40,6 @@ void setup_termination_handler() noexcept
#endif
}
-
int main() noexcept
{
setup_termination_handler();