From d88c5c01a53facaf6c1825034e2e4d15ac41c14e Mon Sep 17 00:00:00 2001 From: Werner Henze Date: Fri, 3 Jan 2025 19:10:16 +0100 Subject: [PATCH] check on which platforms the first test fails --- tests/span_tests.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index d129a64..eed9a3e 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -222,11 +222,11 @@ TEST(span_test, from_pointer_length_constructor) TEST(span_test, from_pointer_pointer_construction) { - // const auto terminateHandler = std::set_terminate([] { - // std::cerr << "Expected Death. from_pointer_pointer_construction"; - // std::abort(); - // }); - // const auto expected = GetExpectedDeathString(terminateHandler); + const auto terminateHandler = std::set_terminate([] { + std::cerr << "Expected Death. from_pointer_pointer_construction"; + std::abort(); + }); + const auto expected = GetExpectedDeathString(terminateHandler); int arr[4] = {1, 2, 3, 4}; @@ -258,10 +258,10 @@ TEST(span_test, from_pointer_pointer_construction) } // this will fail the std::distance() precondition, which asserts on MSVC debug builds - //{ - // auto workaround_macro = [&]() { span s{&arr[1], &arr[0]}; }; - // EXPECT_DEATH(workaround_macro(), expected); - //} + { + auto workaround_macro = [&]() { span s{&arr[1], &arr[0]}; }; + EXPECT_DEATH(workaround_macro(), expected); + } // this will fail the std::distance() precondition, which asserts on MSVC debug builds //{