mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-29 16:53: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"
|
"first" == "second"
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 168 | 120 passed | 44 failed | 4 failed as expected
|
test cases: 169 | 121 passed | 44 failed | 4 failed as expected
|
||||||
assertions: 968 | 860 passed | 87 failed | 21 failed as expected
|
assertions: 969 | 861 passed | 87 failed | 21 failed as expected
|
||||||
|
|
||||||
|
@ -8461,6 +8461,18 @@ PASSED:
|
|||||||
with expansion:
|
with expansion:
|
||||||
"[\x7F]" == "[\x7F]"
|
"[\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
|
atomic if
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -9480,6 +9492,6 @@ MiscTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 168 | 119 passed | 45 failed | 4 failed as expected
|
test cases: 169 | 120 passed | 45 failed | 4 failed as expected
|
||||||
assertions: 970 | 860 passed | 89 failed | 21 failed as expected
|
assertions: 971 | 861 passed | 89 failed | 21 failed as expected
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuitesspanner>
|
<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="global" name="# A test name that starts with a #" time="{duration}"/>
|
||||||
<testcase classname="#748 - captures with unexpected exceptions" name="outside assertions" time="{duration}">
|
<testcase classname="#748 - captures with unexpected exceptions" name="outside assertions" time="{duration}">
|
||||||
<error type="TEST_CASE">
|
<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 quotes" time="{duration}"/>
|
||||||
<testcase classname="XmlEncode" name="string with control char (1)" 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="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="atomic if" time="{duration}"/>
|
||||||
<testcase classname="global" name="boolean member" time="{duration}"/>
|
<testcase classname="global" name="boolean member" time="{duration}"/>
|
||||||
<testcase classname="global" name="checkedElse" time="{duration}"/>
|
<testcase classname="global" name="checkedElse" time="{duration}"/>
|
||||||
|
@ -9085,6 +9085,17 @@ there"
|
|||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</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" >
|
<TestCase name="atomic if" tags="[0][failing]" filename="projects/<exe-name>/MiscTests.cpp" >
|
||||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
@ -10128,7 +10139,7 @@ spanner <OverallResult success="true"/>
|
|||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<OverallResults successes="860" failures="90" expectedFailures="21"/>
|
<OverallResults successes="861" failures="90" expectedFailures="21"/>
|
||||||
</Group>
|
</Group>
|
||||||
<OverallResults successes="860" failures="89" expectedFailures="21"/>
|
<OverallResults successes="861" failures="89" expectedFailures="21"/>
|
||||||
</Catch>
|
</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
|
// This can cause problems as, currently, stdout itself is not redirect - only the cout (and cerr) buffer
|
||||||
printf( "spanner" );
|
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