mirror of
https://github.com/catchorg/Catch2.git
synced 2025-11-03 13:39:32 +01:00
Fix stringifying static array of unsigned chars
The fix leaves an open question: should we keep treating refs to static array of chars as strings, or should we instead use `strnlen` to check if it is null-terminated within the buffer Fixes #1238
This commit is contained in:
@@ -102,6 +102,30 @@ Misc.tests.cpp:<line number>
|
||||
Misc.tests.cpp:<line number>:
|
||||
PASSED:
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
#1238
|
||||
-------------------------------------------------------------------------------
|
||||
Compilation.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Compilation.tests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( std::memcmp(uarr, "123", sizeof(uarr)) == 0 )
|
||||
with expansion:
|
||||
0 == 0
|
||||
with messages:
|
||||
uarr := "123"
|
||||
sarr := "456"
|
||||
|
||||
Compilation.tests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( std::memcmp(sarr, "456", sizeof(sarr)) == 0 )
|
||||
with expansion:
|
||||
0 == 0
|
||||
with messages:
|
||||
uarr := "123"
|
||||
sarr := "456"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
#748 - captures with unexpected exceptions
|
||||
outside assertions
|
||||
@@ -308,6 +332,6 @@ with expansion:
|
||||
!true
|
||||
|
||||
===============================================================================
|
||||
test cases: 12 | 9 passed | 1 failed | 2 failed as expected
|
||||
assertions: 35 | 28 passed | 4 failed | 3 failed as expected
|
||||
test cases: 13 | 10 passed | 1 failed | 2 failed as expected
|
||||
assertions: 37 | 30 passed | 4 failed | 3 failed as expected
|
||||
|
||||
|
||||
Reference in New Issue
Block a user