mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-16 02:05:38 +02:00
Add test for overriding the fallback stringifier
This commit is contained in:
@@ -988,6 +988,7 @@ ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( item
|
||||
ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( item ) == "StringMaker<has_maker_and_operator>" for: "StringMaker<has_maker_and_operator>"
|
||||
==
|
||||
"StringMaker<has_maker_and_operator>"
|
||||
ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify(item) == "{ !!! }" for: "{ !!! }" == "{ !!! }"
|
||||
ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" for: "operator<<( has_operator )"
|
||||
==
|
||||
"operator<<( has_operator )"
|
||||
@@ -1002,7 +1003,7 @@ ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify(string
|
||||
==
|
||||
"stringmaker(streamable_range)"
|
||||
ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" for: "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }"
|
||||
ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify(disabled_range{}) == "{?}" for: "{?}" == "{?}"
|
||||
ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify(disabled_range{}) == "{ !!! }" for: "{ !!! }" == "{ !!! }"
|
||||
ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( v ) == "{ StringMaker<has_maker> }" for: "{ StringMaker<has_maker> }"
|
||||
==
|
||||
"{ StringMaker<has_maker> }"
|
||||
|
@@ -1064,6 +1064,6 @@ with expansion:
|
||||
"first" == "second"
|
||||
|
||||
===============================================================================
|
||||
test cases: 199 | 148 passed | 47 failed | 4 failed as expected
|
||||
assertions: 1004 | 878 passed | 105 failed | 21 failed as expected
|
||||
test cases: 200 | 149 passed | 47 failed | 4 failed as expected
|
||||
assertions: 1005 | 879 passed | 105 failed | 21 failed as expected
|
||||
|
||||
|
@@ -7890,6 +7890,18 @@ with expansion:
|
||||
==
|
||||
"StringMaker<has_maker_and_operator>"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
stringify( has_neither )
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringWhich.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringWhich.tests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( ::Catch::Detail::stringify(item) == "{ !!! }" )
|
||||
with expansion:
|
||||
"{ !!! }" == "{ !!! }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
stringify( has_operator )
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -7982,9 +7994,9 @@ with expansion:
|
||||
|
||||
ToStringWhich.tests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( ::Catch::Detail::stringify(disabled_range{}) == "{?}" )
|
||||
REQUIRE( ::Catch::Detail::stringify(disabled_range{}) == "{ !!! }" )
|
||||
with expansion:
|
||||
"{?}" == "{?}"
|
||||
"{ !!! }" == "{ !!! }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString( vectors<has_maker> )
|
||||
@@ -8499,6 +8511,6 @@ Misc.tests.cpp:<line number>:
|
||||
PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 199 | 134 passed | 61 failed | 4 failed as expected
|
||||
assertions: 1015 | 874 passed | 120 failed | 21 failed as expected
|
||||
test cases: 200 | 135 passed | 61 failed | 4 failed as expected
|
||||
assertions: 1016 | 875 passed | 120 failed | 21 failed as expected
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuitesloose text artifact
|
||||
>
|
||||
<testsuite name="<exe-name>" errors="15" failures="106" tests="1016" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testsuite name="<exe-name>" errors="15" failures="106" tests="1017" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="#1005: Comparing pointer to int and long (NULL can be either on various systems)" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="#1027" time="{duration}"/>
|
||||
@@ -822,6 +822,7 @@ Tricky.tests.cpp:<line number>
|
||||
</testcase>
|
||||
<testcase classname="<exe-name>.global" name="stringify( has_maker )" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="stringify( has_maker_and_toString )" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="stringify( has_neither )" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="stringify( has_operator )" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="toString on const wchar_t const pointer returns the string contents" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="toString on const wchar_t pointer returns the string contents" time="{duration}"/>
|
||||
|
@@ -8755,6 +8755,17 @@ loose text artifact
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="stringify( has_neither )" tags="[toString]" filename="projects/<exe-name>/UsageTests/ToStringWhich.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/ToStringWhich.tests.cpp" >
|
||||
<Original>
|
||||
::Catch::Detail::stringify(item) == "{ !!! }"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{ !!! }" == "{ !!! }"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="stringify( has_operator )" tags="[toString]" filename="projects/<exe-name>/UsageTests/ToStringWhich.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/ToStringWhich.tests.cpp" >
|
||||
<Original>
|
||||
@@ -8843,10 +8854,10 @@ loose text artifact
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/ToStringWhich.tests.cpp" >
|
||||
<Original>
|
||||
::Catch::Detail::stringify(disabled_range{}) == "{?}"
|
||||
::Catch::Detail::stringify(disabled_range{}) == "{ !!! }"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"{?}" == "{?}"
|
||||
"{ !!! }" == "{ !!! }"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
@@ -9358,7 +9369,7 @@ loose text artifact
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="874" failures="121" expectedFailures="21"/>
|
||||
<OverallResults successes="875" failures="121" expectedFailures="21"/>
|
||||
</Group>
|
||||
<OverallResults successes="874" failures="120" expectedFailures="21"/>
|
||||
<OverallResults successes="875" failures="120" expectedFailures="21"/>
|
||||
</Catch>
|
||||
|
Reference in New Issue
Block a user