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:
Martin Hořeňovský
2018-04-06 11:39:40 +02:00
parent 1ca8f43b01
commit ab30621138
8 changed files with 112 additions and 14 deletions

View File

@@ -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>