From 904995fde3345d9a210d679c02d9b08f967d7a32 Mon Sep 17 00:00:00 2001 From: Werner Henze Date: Fri, 3 Jan 2025 19:20:05 +0100 Subject: [PATCH] check test 2 --- tests/span_tests.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index eed9a3e..abc59d1 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -258,17 +258,17 @@ TEST(span_test, from_pointer_pointer_construction) } // this will fail the std::distance() precondition, which asserts on MSVC debug builds - { + { // this test succeeds on all platforms, but it relies on UB 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 - //{ - // int* p = nullptr; - // auto workaround_macro = [&]() { span s{&arr[0], p}; }; - // EXPECT_DEATH(workaround_macro(), expected); - //} + { + int* p = nullptr; + auto workaround_macro = [&]() { span s{&arr[0], p}; }; + EXPECT_DEATH(workaround_macro(), expected); + } { int* p = nullptr;