Cleanups output normalization in ApprovalTests

Removed:
 * NaN normalization
 * INFINITY normalization
 * errno normalization
 * Completely unused duration regex

Tests using these macros should be tagged `[approvals]`
so they are not run as part of approval tests.

Also simplified regex for the test's executable filename,
and hidden some tests relying on nullptr normalization.
This commit is contained in:
Martin Hořeňovský
2022-01-26 23:47:40 +01:00
parent d861e73f86
commit 4ff8b27bb6
22 changed files with 55 additions and 264 deletions

View File

@@ -1,6 +1,4 @@
Misc.tests.cpp:<line number>: passed: with 1 message: 'yay'
Decomposition.tests.cpp:<line number>: passed: fptr == 0 for: 0 == 0
Decomposition.tests.cpp:<line number>: passed: fptr == 0l for: 0 == 0
Compilation.tests.cpp:<line number>: passed: y.v == 0 for: 0 == 0
Compilation.tests.cpp:<line number>: passed: 0 == y.v for: 0 == 0
Compilation.tests.cpp:<line number>: passed: t1 == t2 for: {?} == {?}
@@ -94,7 +92,7 @@ Compilation.tests.cpp:<line number>: passed: throws_int(false)
Compilation.tests.cpp:<line number>: passed: "aaa", Catch::Matchers::EndsWith("aaa") for: "aaa" ends with: "aaa"
Compilation.tests.cpp:<line number>: passed: templated_tests<int>(3) for: true
Misc.tests.cpp:<line number>: failed: f() == 0 for: 1 == 0
Misc.tests.cpp:<line number>: passed: errno == 1 for: 1 == 1
Misc.tests.cpp:<line number>: passed: errno_after == 1 for: 1 == 1
Compilation.tests.cpp:<line number>: passed: x == 4 for: {?} == 4 with 1 message: 'dummy := 0'
Misc.tests.cpp:<line number>: passed: with 1 message: 'Everything is OK'
Misc.tests.cpp:<line number>: passed: with 1 message: 'Everything is OK'
@@ -2418,9 +2416,6 @@ ToStringTuple.tests.cpp:<line number>: passed: "{ }" == ::Catch::Detail::stringi
ToStringTuple.tests.cpp:<line number>: passed: "1.2f" == ::Catch::Detail::stringify(float(1.2)) for: "1.2f" == "1.2f"
ToStringTuple.tests.cpp:<line number>: passed: "{ 1.2f, 0 }" == ::Catch::Detail::stringify(type{1.2f,0}) for: "{ 1.2f, 0 }" == "{ 1.2f, 0 }"
ToStringTuple.tests.cpp:<line number>: passed: "{ 0 }" == ::Catch::Detail::stringify(type{0}) for: "{ 0 }" == "{ 0 }"
ToStringTuple.tests.cpp:<line number>: passed: "{ 0, 42, \"Catch me\" }" == ::Catch::Detail::stringify(value) for: "{ 0, 42, "Catch me" }"
==
"{ 0, 42, "Catch me" }"
ToStringTuple.tests.cpp:<line number>: passed: "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) for: "{ "hello", "world" }"
==
"{ "hello", "world" }"