mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-16 18:15:42 +02: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:
@@ -96,6 +96,37 @@
|
||||
<TestCase name="#1175 - Hidden Test" tags="[.]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="#1238" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" >
|
||||
<Info>
|
||||
uarr := "123"
|
||||
</Info>
|
||||
<Info>
|
||||
sarr := "456"
|
||||
</Info>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" >
|
||||
<Original>
|
||||
std::memcmp(uarr, "123", sizeof(uarr)) == 0
|
||||
</Original>
|
||||
<Expanded>
|
||||
0 == 0
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Info>
|
||||
uarr := "123"
|
||||
</Info>
|
||||
<Info>
|
||||
sarr := "456"
|
||||
</Info>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" >
|
||||
<Original>
|
||||
std::memcmp(sarr, "456", sizeof(sarr)) == 0
|
||||
</Original>
|
||||
<Expanded>
|
||||
0 == 0
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="#748 - captures with unexpected exceptions" tags="[!shouldfail][!throws][.][failing]" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
|
||||
<Section name="outside assertions" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
|
||||
<Info>
|
||||
@@ -9882,7 +9913,7 @@ loose text artifact
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="933" failures="122" expectedFailures="21"/>
|
||||
<OverallResults successes="935" failures="122" expectedFailures="21"/>
|
||||
</Group>
|
||||
<OverallResults successes="933" failures="121" expectedFailures="21"/>
|
||||
<OverallResults successes="935" failures="121" expectedFailures="21"/>
|
||||
</Catch>
|
||||
|
Reference in New Issue
Block a user