mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-27 13:13:30 +01:00
Added test for assertion with comma
This commit is contained in:
parent
d17d94e45d
commit
51c143b2c6
@ -940,6 +940,6 @@ with expansion:
|
||||
"first" == "second"
|
||||
|
||||
===============================================================================
|
||||
test cases: 168 | 120 passed | 44 failed | 4 failed as expected
|
||||
assertions: 968 | 860 passed | 87 failed | 21 failed as expected
|
||||
test cases: 169 | 121 passed | 44 failed | 4 failed as expected
|
||||
assertions: 969 | 861 passed | 87 failed | 21 failed as expected
|
||||
|
||||
|
@ -8461,6 +8461,18 @@ PASSED:
|
||||
with expansion:
|
||||
"[\x7F]" == "[\x7F]"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
assertions with commas are allowed
|
||||
-------------------------------------------------------------------------------
|
||||
TrickyTests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
TrickyTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( std::vector<int>{1, 2} == std::vector<int>{1, 2} )
|
||||
with expansion:
|
||||
{ 1, 2 } == { 1, 2 }
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
atomic if
|
||||
-------------------------------------------------------------------------------
|
||||
@ -9480,6 +9492,6 @@ MiscTests.cpp:<line number>:
|
||||
PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 168 | 119 passed | 45 failed | 4 failed as expected
|
||||
assertions: 970 | 860 passed | 89 failed | 21 failed as expected
|
||||
test cases: 169 | 120 passed | 45 failed | 4 failed as expected
|
||||
assertions: 971 | 861 passed | 89 failed | 21 failed as expected
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuitesspanner>
|
||||
<testsuite name="<exe-name>" errors="13" failures="77" tests="971" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testsuite name="<exe-name>" errors="13" failures="77" tests="972" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testcase classname="global" name="# A test name that starts with a #" time="{duration}"/>
|
||||
<testcase classname="#748 - captures with unexpected exceptions" name="outside assertions" time="{duration}">
|
||||
<error type="TEST_CASE">
|
||||
@ -608,6 +608,7 @@ ExceptionTests.cpp:<line number>
|
||||
<testcase classname="XmlEncode" name="string with quotes" time="{duration}"/>
|
||||
<testcase classname="XmlEncode" name="string with control char (1)" time="{duration}"/>
|
||||
<testcase classname="XmlEncode" name="string with control char (x7F)" time="{duration}"/>
|
||||
<testcase classname="global" name="assertions with commas are allowed" time="{duration}"/>
|
||||
<testcase classname="global" name="atomic if" time="{duration}"/>
|
||||
<testcase classname="global" name="boolean member" time="{duration}"/>
|
||||
<testcase classname="global" name="checkedElse" time="{duration}"/>
|
||||
|
@ -9085,6 +9085,17 @@ there"
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="assertions with commas are allowed" filename="projects/<exe-name>/TrickyTests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TrickyTests.cpp" >
|
||||
<Original>
|
||||
std::vector<int>{1, 2} == std::vector<int>{1, 2}
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ 1, 2 } == { 1, 2 }
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="atomic if" tags="[0][failing]" filename="projects/<exe-name>/MiscTests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" >
|
||||
<Original>
|
||||
@ -10128,7 +10139,7 @@ spanner <OverallResult success="true"/>
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="860" failures="90" expectedFailures="21"/>
|
||||
<OverallResults successes="861" failures="90" expectedFailures="21"/>
|
||||
</Group>
|
||||
<OverallResults successes="860" failures="89" expectedFailures="21"/>
|
||||
<OverallResults successes="861" failures="89" expectedFailures="21"/>
|
||||
</Catch>
|
||||
|
@ -398,3 +398,8 @@ TEST_CASE( "has printf", "" ) {
|
||||
// This can cause problems as, currently, stdout itself is not redirect - only the cout (and cerr) buffer
|
||||
printf( "spanner" );
|
||||
}
|
||||
|
||||
TEST_CASE( "assertions with commas are allowed" ) {
|
||||
|
||||
REQUIRE( std::vector<int>{1, 2} == std::vector<int>{1, 2} );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user