mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Added tests for toString<std::tuple<>> and rebased
This commit is contained in:
@@ -786,6 +786,6 @@ with expansion:
|
||||
"first" == "second"
|
||||
|
||||
===============================================================================
|
||||
test cases: 149 | 110 passed | 38 failed | 1 failed as expected
|
||||
assertions: 753 | 661 passed | 79 failed | 13 failed as expected
|
||||
test cases: 155 | 116 passed | 38 failed | 1 failed as expected
|
||||
assertions: 761 | 669 passed | 79 failed | 13 failed as expected
|
||||
|
||||
|
@@ -7373,6 +7373,96 @@ PASSED:
|
||||
with expansion:
|
||||
true == true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ }" == Catch::toString(type{}) )
|
||||
with expansion:
|
||||
"{ }" == "{ }"
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ }" == Catch::toString(value) )
|
||||
with expansion:
|
||||
"{ }" == "{ }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<int>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ 0 }" == Catch::toString(type{0}) )
|
||||
with expansion:
|
||||
"{ 0 }" == "{ 0 }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<float,int>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "1.2f" == Catch::toString(float(1.2)) )
|
||||
with expansion:
|
||||
"1.2f" == "1.2f"
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ 1.2f, 0 }" == Catch::toString(type{1.2,0}) )
|
||||
with expansion:
|
||||
"{ 1.2f, 0 }" == "{ 1.2f, 0 }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<string,string>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ \"hello\", \"world\" }" == Catch::toString(type{"hello","world"}) )
|
||||
with expansion:
|
||||
"{ "hello", "world" }"
|
||||
==
|
||||
"{ "hello", "world" }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<tuple<int>,tuple<>,float>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ { 42 }, { }, 1.2f }" == Catch::toString(value) )
|
||||
with expansion:
|
||||
"{ { 42 }, { }, 1.2f }"
|
||||
==
|
||||
"{ { 42 }, { }, 1.2f }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<nullptr,int,const char *>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ nullptr, 42, \"Catch me\" }" == Catch::toString(value) )
|
||||
with expansion:
|
||||
"{ nullptr, 42, "Catch me" }"
|
||||
==
|
||||
"{ nullptr, 42, "Catch me" }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Tag alias can be registered against tag patterns
|
||||
The same tag alias can only be registered once
|
||||
@@ -7816,6 +7906,6 @@ with expansion:
|
||||
true
|
||||
|
||||
===============================================================================
|
||||
test cases: 149 | 94 passed | 54 failed | 1 failed as expected
|
||||
assertions: 773 | 661 passed | 99 failed | 13 failed as expected
|
||||
test cases: 155 | 100 passed | 54 failed | 1 failed as expected
|
||||
assertions: 781 | 669 passed | 99 failed | 13 failed as expected
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<testsuites>
|
||||
<testsuite name="all tests" errors="12" failures="87" tests="773" hostname="tbd" time="{duration}" timestamp="tbd">
|
||||
<testsuite name="all tests" errors="12" failures="87" tests="781" hostname="tbd" time="{duration}" timestamp="tbd">
|
||||
<testcase classname="global" name="toString(enum)" time="{duration}"/>
|
||||
<testcase classname="global" name="toString(enum w/operator<<)" time="{duration}"/>
|
||||
<testcase classname="global" name="toString(enum class)" time="{duration}"/>
|
||||
@@ -585,6 +585,12 @@ TrickyTests.cpp:<line number>
|
||||
<testcase classname="Parse test names and tags" name="empty tag" time="{duration}"/>
|
||||
<testcase classname="Parse test names and tags" name="empty quoted name" time="{duration}"/>
|
||||
<testcase classname="Parse test names and tags" name="quoted string followed by tag exclusion" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<int>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<float,int>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<string,string>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<tuple<int>,tuple<>,float>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<nullptr,int,const char *>" time="{duration}"/>
|
||||
<testcase classname="Tag alias can be registered against tag patterns" name="The same tag alias can only be registered once" time="{duration}"/>
|
||||
<testcase classname="Tag alias can be registered against tag patterns" name="Tag aliases must be of the form [@name]" time="{duration}"/>
|
||||
<testcase classname="global" name="Anonymous test case 1" time="{duration}"/>
|
||||
|
@@ -7656,6 +7656,94 @@ there"
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="tuple<>">
|
||||
<Expression success="true" type="CHECK" filename="projects/SelfTest/ToStringTuple.cpp" >
|
||||
<Original>
|
||||
"{ }" == Catch::toString(type{})
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{ }" == "{ }"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK" filename="projects/SelfTest/ToStringTuple.cpp" >
|
||||
<Original>
|
||||
"{ }" == Catch::toString(value)
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{ }" == "{ }"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="tuple<int>">
|
||||
<Expression success="true" type="CHECK" filename="projects/SelfTest/ToStringTuple.cpp" >
|
||||
<Original>
|
||||
"{ 0 }" == Catch::toString(type{0})
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{ 0 }" == "{ 0 }"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="tuple<float,int>">
|
||||
<Expression success="true" type="CHECK" filename="projects/SelfTest/ToStringTuple.cpp" >
|
||||
<Original>
|
||||
"1.2f" == Catch::toString(float(1.2))
|
||||
</Original>
|
||||
<Expanded>
|
||||
"1.2f" == "1.2f"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK" filename="projects/SelfTest/ToStringTuple.cpp" >
|
||||
<Original>
|
||||
"{ 1.2f, 0 }" == Catch::toString(type{1.2,0})
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{ 1.2f, 0 }" == "{ 1.2f, 0 }"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="tuple<string,string>">
|
||||
<Expression success="true" type="CHECK" filename="projects/SelfTest/ToStringTuple.cpp" >
|
||||
<Original>
|
||||
"{ \"hello\", \"world\" }" == Catch::toString(type{"hello","world"})
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{ "hello", "world" }"
|
||||
==
|
||||
"{ "hello", "world" }"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="tuple<tuple<int>,tuple<>,float>">
|
||||
<Expression success="true" type="CHECK" filename="projects/SelfTest/ToStringTuple.cpp" >
|
||||
<Original>
|
||||
"{ { 42 }, { }, 1.2f }" == Catch::toString(value)
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{ { 42 }, { }, 1.2f }"
|
||||
==
|
||||
"{ { 42 }, { }, 1.2f }"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="tuple<nullptr,int,const char *>">
|
||||
<Expression success="true" type="CHECK" filename="projects/SelfTest/ToStringTuple.cpp" >
|
||||
<Original>
|
||||
"{ nullptr, 42, \"Catch me\" }" == Catch::toString(value)
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{ nullptr, 42, "Catch me" }"
|
||||
==
|
||||
"{ nullptr, 42, "Catch me" }"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="Tag alias can be registered against tag patterns">
|
||||
<Section name="The same tag alias can only be registered once">
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/SelfTest/TagAliasTests.cpp" >
|
||||
@@ -8086,7 +8174,7 @@ there"
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="661" failures="99" expectedFailures="13"/>
|
||||
<OverallResults successes="669" failures="99" expectedFailures="13"/>
|
||||
</Group>
|
||||
<OverallResults successes="661" failures="99" expectedFailures="13"/>
|
||||
<OverallResults successes="669" failures="99" expectedFailures="13"/>
|
||||
</Catch>
|
||||
|
Reference in New Issue
Block a user