check on which platforms the first test fails

This commit is contained in:
Werner Henze 2025-01-03 19:10:16 +01:00
parent e31f8d76e5
commit d88c5c01a5

View File

@ -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<int> s{&arr[1], &arr[0]}; };
// EXPECT_DEATH(workaround_macro(), expected);
//}
{
auto workaround_macro = [&]() { span<int> s{&arr[1], &arr[0]}; };
EXPECT_DEATH(workaround_macro(), expected);
}
// this will fail the std::distance() precondition, which asserts on MSVC debug builds
//{