catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Rebased approvals
- Commit
d30f1dda020c8bbe09937b78561e8e0d26fbe08d- Author
- Phil Nash ·
- Parents
3bce8ba14b5d
Changes
projects/SelfTest/Baselines/compact.sw.approved.txt | 1 + projects/SelfTest/Baselines/console.std.approved.txt | 2 +- projects/SelfTest/Baselines/console.sw.approved.txt | 16 +++++++++++++++- projects/SelfTest/Baselines/junit.sw.approved.txt | 3 ++- projects/SelfTest/Baselines/xml.sw.approved.txt | 19 +++++++++++++++---- 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/projects/SelfTest/Baselines/compact.sw.approved.txt b/projects/SelfTest/Baselines/compact.sw.approved.txt index 8447e839..e30453d9 100644 --- a/projects/SelfTest/Baselines/compact.sw.approved.txt +++ b/projects/SelfTest/Baselines/compact.sw.approved.txt @@ -1004,6 +1004,7 @@ String.tests.cpp:<line number>: passed: ss.c_str() != rawChars for: "hello" != " String.tests.cpp:<line number>: passed: isSubstring( ss ) == false for: false == false String.tests.cpp:<line number>: passed: isOwned( ss ) for: true String.tests.cpp:<line number>: passed: ss.currentData() != s.currentData() for: "hello" != "hello world!" +String.tests.cpp:<line number>: passed: isOwned(ss) == true for: true == true String.tests.cpp:<line number>: passed: ss.size() == 6 for: 6 == 6 String.tests.cpp:<line number>: passed: std::strcmp( ss.c_str(), "world!" ) == 0 for: 0 == 0 String.tests.cpp:<line number>: passed: s.c_str() == s2.c_str() for: "hello world!" == "hello world!" diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index aa991bd4..40113214 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -1300,5 +1300,5 @@ due to unexpected exception with message: =============================================================================== test cases: 267 | 200 passed | 63 failed | 4 failed as expected -assertions: 1453 | 1308 passed | 124 failed | 21 failed as expected +assertions: 1454 | 1309 passed | 124 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index e13a6c23..e9dc6908 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -7367,6 +7367,20 @@ String.tests.cpp:<line number>: PASSED: with expansion: "hello" != "hello world!" +------------------------------------------------------------------------------- +StringRef + Substrings + c_str() causes copy + Self-assignment after substring +------------------------------------------------------------------------------- +String.tests.cpp:<line number> +............................................................................... + +String.tests.cpp:<line number>: PASSED: + REQUIRE( isOwned(ss) == true ) +with expansion: + true == true + ------------------------------------------------------------------------------- StringRef Substrings @@ -11424,5 +11438,5 @@ Misc.tests.cpp:<line number>: PASSED: =============================================================================== test cases: 267 | 184 passed | 79 failed | 4 failed as expected -assertions: 1470 | 1308 passed | 141 failed | 21 failed as expected +assertions: 1471 | 1309 passed | 141 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index a7b77533..b95c130e 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuitesloose text artifact > - <testsuite name="<exe-name>" errors="17" failures="125" tests="1471" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="125" tests="1472" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals]"/> <property name="random-seed" value="1"/> @@ -667,6 +667,7 @@ Matchers.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="StringRef/From sub-string" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/Substrings/zero-based substring" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/Substrings/c_str() causes copy" time="{duration}"/> + <testcase classname="<exe-name>.global" name="StringRef/Substrings/c_str() causes copy/Self-assignment after substring" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/Substrings/non-zero-based substring" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of full refs should match" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of substring refs should not match" time="{duration}"/> diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index fcd6ff13..0a98869e 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -9179,9 +9179,20 @@ Message from section two "hello" != "hello world!" </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <Section name="Self-assignment after substring" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" > + <Original> + isOwned(ss) == true + </Original> + <Expanded> + true == true + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <OverallResults successes="8" failures="0" expectedFailures="0"/> </Section> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0"/> </Section> <Section name="Substrings" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="non-zero-based substring" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -13769,7 +13780,7 @@ loose text artifact </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="1308" failures="142" expectedFailures="21"/> + <OverallResults successes="1309" failures="142" expectedFailures="21"/> </Group> - <OverallResults successes="1308" failures="141" expectedFailures="21"/> + <OverallResults successes="1309" failures="141" expectedFailures="21"/> </Catch>