8000 Workaround Catch2 problems with std::byte · connectivecpp/shared-buffer@50a41ba · GitHub
[go: up one dir, main page]

Skip to content
65ED

Commit 50a41ba

Browse files
Workaround Catch2 problems with std::byte
1 parent ea0c3d6 commit 50a41ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/shared_buffer_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,11 @@ TEST_CASE ( "Use get_byte_vec for external modification of buffer",
336336

337337
auto r = msb.get_byte_vec();
338338
// REQUIRE (r == bv); // Catch2 build problems on MSVC
339+
std::array<std::byte, 3> arr2 { r[0], r[1], r[2] };
340+
REQUIRE (chops::compare_byte_arrays(arr, arr2));
339341
r[0] = std::byte(0xdd);
340342
// REQUIRE_FALSE (r == bv); // Catch2 build problems on MSVC
343+
std::array<std::byte, 3> arr3 { r[0], r[1], r[2] };
344+
REQUIRE_FALSE (chops::compare_byte_arrays(arr, arr3));
341345
}
342346

0 commit comments

Comments
 (0)
0