Skip to content

Commit

Permalink
update approval tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CrustyAuklet committed Jul 2, 2024
1 parent e8c1eb9 commit f7625ae
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 115 deletions.
57 changes: 30 additions & 27 deletions tests/approval_tests/data/expected/reporter_catch2_xml_allfail
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test shouldfail good fail" tags="[tag2][tag1][!shouldfail]" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
expected test to fail
</Failure>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test no tags fail" tags="" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -27,7 +27,7 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="typed test no tags fail &lt;int&gt;" tags="" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -38,7 +38,7 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="typed test no tags fail &lt;float&gt;" tags="" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -49,7 +49,7 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="typed test with tags fail &lt;int&gt;" tags="[tag1]" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -60,7 +60,7 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="typed test with tags fail &lt;float&gt;" tags="[tag1]" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -71,7 +71,7 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test fixture fail" tags="[tag with space]" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -82,13 +82,13 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test FAIL fail" tags="" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
something bad
</Failure>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test expression fail" tags="" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -99,7 +99,7 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test long expression fail" tags="" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -110,7 +110,7 @@
1 == 1
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test too long expression fail" tags="" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -121,19 +121,19 @@
super_long_string != super_long_string
</Expanded>
</Expression>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test too long message fail" tags="" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
</Failure>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test NOTHROW fail" tags="" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
expected throw_something(true) not to throw but it threw a std::exception; message: I threw
</Failure>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test THROW fail" tags="" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
Expand All @@ -145,38 +145,41 @@
<Failure filename="*testing_reporters.cpp" line="*">
could not match caught std::runtime_error with expected content: could not find &apos;I throws&apos; in &apos;I threw&apos;
</Failure>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test unexpected throw fail" tags="" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
unexpected std::exception caught; message: unexpected error
</Failure>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test unexpected throw in section fail" tags="" filename="*testing_reporters.cpp" line="*">
<Section name="section 1" filename="*testing_reporters.cpp" line="*">
<Section name="section 2" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
unexpected std::exception caught; message: unexpected error
</Failure>
<OverallResults successes="0" failures="0" expectedFailures="0" skipped="true" durationInSeconds="*"/>
</Section>
<OverallResults successes="0" failures="0" expectedFailures="0" skipped="true" durationInSeconds="*"/>
</Section>
<OverallResult success="false" durationInSeconds="*"/>
<Failure filename="*testing_reporters.cpp" line="*">
unexpected std::exception caught; message: unexpected error
</Failure>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test unexpected throw in check fail" tags="" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
unexpected std::exception caught; message: unexpected error
</Failure>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test unexpected throw in check &amp; section fail" tags="" filename="*testing_reporters.cpp" line="*">
<Section name="section 1" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
unexpected std::exception caught; message: unexpected error
</Failure>
<OverallResults successes="0" failures="0" expectedFailures="0" skipped="true" durationInSeconds="*"/>
</Section>
<OverallResult success="false" durationInSeconds="*"/>
<Failure filename="*testing_reporters.cpp" line="*">
unexpected std::exception caught; message: unexpected error
</Failure>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<OverallResults successes="14" failures="21" expectedFailures="0"/>
<OverallResultsCases successes="0" failures="19" expectedFailures="0"/>
<OverallResults successes="14" failures="21" expectedFailures="0" skips="0"/>
<OverallResultsCases successes="0" failures="19" expectedFailures="0" skips="0"/>
</Catch2TestRun>
38 changes: 19 additions & 19 deletions tests/approval_tests/data/expected/reporter_catch2_xml_allpass
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

<Catch2TestRun name="test" rng-seed="0" xml-format-version="2" catch2-version="*.snitch" filters="&quot;* pass*&quot;">
<TestCase name="test pass" tags="[tag2][tag1]" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test mayfail good pass" tags="[tag2][tag1][!mayfail]" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test mayfail bad pass" tags="[tag2][tag1][!mayfail]" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -16,7 +16,7 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test shouldfail bad pass" tags="[tag2][tag1][!shouldfail]" filename="*testing_reporters.cpp" line="*">
<Expression success="false" type="CHECK" filename="*testing_reporters.cpp" line="*">
Expand All @@ -27,50 +27,50 @@
1 != 2
</Expanded>
</Expression>
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test no tags pass" tags="" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="typed test no tags pass &lt;int&gt;" tags="" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="typed test no tags pass &lt;float&gt;" tags="" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="typed test with tags pass &lt;int&gt;" tags="[tag1]" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="typed test with tags pass &lt;float&gt;" tags="[tag1]" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test fixture pass" tags="[tag with space]" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test SUCCEED pass" tags="" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test expression pass" tags="" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test long expression pass" tags="" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test too long expression pass" tags="" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test too long message pass" tags="" filename="*testing_reporters.cpp" line="*">
<Failure filename="*testing_reporters.cpp" line="*">
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
</Failure>
<OverallResult success="false" durationInSeconds="*"/>
<OverallResult success="false" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test NOTHROW pass" tags="" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<TestCase name="test THROW pass" tags="" filename="*testing_reporters.cpp" line="*">
<OverallResult success="true" durationInSeconds="*"/>
<OverallResult success="true" skips="0" durationInSeconds="*"/>
</TestCase>
<OverallResults successes="23" failures="1" expectedFailures="2"/>
<OverallResultsCases successes="14" failures="1" expectedFailures="2"/>
<OverallResults successes="23" failures="1" expectedFailures="2" skips="0"/>
<OverallResultsCases successes="14" failures="1" expectedFailures="2" skips="0"/>
</Catch2TestRun>
Loading

0 comments on commit f7625ae

Please sign in to comment.