diff options
| author | Martin Hořeňovský | 2021-12-19 15:16:56 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-01-01 14:10:52 +0100 |
| commit | 8baf9c05a3ab8ba2de400678539d0256ec60b4b4 (patch) | |
| tree | 62e0594be3ea5bd18f3138fed1489cc97a98ec99 | |
| parent | ccd67b293d7595a0cf2dc6c4bfb2017fc18c1f14 (diff) | |
| download | catch3-8baf9c05a3ab8ba2de400678539d0256ec60b4b4.tar.gz | |
Add more unit tests
* Call order of listeners/reporters in multireporter
* Adding listeners/reporters properly updates reporter preferences
19 files changed, 836 insertions, 19 deletions
diff --git a/src/catch2/reporters/catch_reporter_listening.hpp b/src/catch2/reporters/catch_reporter_listening.hpp index f5b3a2ec..133ce8e1 100644 --- a/src/catch2/reporters/catch_reporter_listening.hpp +++ b/src/catch2/reporters/catch_reporter_listening.hpp @@ -30,11 +30,8 @@ namespace Catch { public: ListeningReporter( IConfig const* config ): - IStreamingReporter( config ) { - // We will assume that listeners will always want all assertions - m_preferences.shouldReportAllAssertions = true; - } - + IStreamingReporter( config ) + {} void addListener( IStreamingReporterPtr&& listener ); void addReporter( IStreamingReporterPtr&& reporter ); diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt index 4465d1e1..34a28749 100644 --- a/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -170,6 +170,8 @@ Nor would this :test-result: FAIL Matchers can be negated (Not) with the ! operator - failing :test-result: XFAIL Mayfail test case with nested sections :test-result: FAIL Mismatching exception messages failing the test +:test-result: PASS Multireporter calls reporters and listeners in correct order +:test-result: PASS Multireporter updates ReporterPreferences properly :test-result: PASS Nested generators and captured variables :test-result: FAIL Nice descriptive name :test-result: FAIL Non-std exceptions can be translated diff --git a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt index 328fcf50..e45cec60 100644 --- a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt @@ -168,6 +168,8 @@ :test-result: FAIL Matchers can be negated (Not) with the ! operator - failing :test-result: XFAIL Mayfail test case with nested sections :test-result: FAIL Mismatching exception messages failing the test +:test-result: PASS Multireporter calls reporters and listeners in correct order +:test-result: PASS Multireporter updates ReporterPreferences properly :test-result: PASS Nested generators and captured variables :test-result: FAIL Nice descriptive name :test-result: FAIL Non-std exceptions can be translated diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index 517b4d93..0babaf7d 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -941,6 +941,25 @@ Condition.tests.cpp:<line number>: failed: explicitly Condition.tests.cpp:<line number>: failed: explicitly Exception.tests.cpp:<line number>: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" Exception.tests.cpp:<line number>: failed: thisThrows(), "should fail" for: "expected exception" equals: "should fail" +Reporters.tests.cpp:<line number>: passed: records == expected for: { "Hello", "world", "Goodbye", "world" } +== +{ "Hello", "world", "Goodbye", "world" } +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true Generators.tests.cpp:<line number>: passed: values > -6 for: 3 > -6 Generators.tests.cpp:<line number>: passed: values > -6 for: 4 > -6 Generators.tests.cpp:<line number>: passed: values > -6 for: 5 > -6 diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt index 7196e831..1966443b 100644 --- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt @@ -939,6 +939,25 @@ Condition.tests.cpp:<line number>: failed: explicitly Condition.tests.cpp:<line number>: failed: explicitly Exception.tests.cpp:<line number>: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" Exception.tests.cpp:<line number>: failed: thisThrows(), "should fail" for: "expected exception" equals: "should fail" +Reporters.tests.cpp:<line number>: passed: records == expected for: { "Hello", "world", "Goodbye", "world" } +== +{ "Hello", "world", "Goodbye", "world" } +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:<line number>: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true Generators.tests.cpp:<line number>: passed: values > -6 for: 3 > -6 Generators.tests.cpp:<line number>: passed: values > -6 for: 4 > -6 Generators.tests.cpp:<line number>: passed: values > -6 for: 5 > -6 diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt index dfc8d3bd..ac979989 100644 --- a/tests/SelfTest/Baselines/console.std.approved.txt +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -1395,6 +1395,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 380 | 304 passed | 69 failed | 7 failed as expected -assertions: 2194 | 2039 passed | 128 failed | 27 failed as expected +test cases: 382 | 306 passed | 69 failed | 7 failed as expected +assertions: 2211 | 2056 passed | 128 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt index 4b4a2ed0..5d733c77 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -7200,6 +7200,125 @@ with expansion: "expected exception" equals: "should fail" ------------------------------------------------------------------------------- +Multireporter calls reporters and listeners in correct order +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( records == expected ) +with expansion: + { "Hello", "world", "Goodbye", "world" } + == + { "Hello", "world", "Goodbye", "world" } + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == false ) +with expansion: + false == false + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly + Adding listeners +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == false ) +with expansion: + false == false + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly + Adding reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- Nested generators and captured variables ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> @@ -17653,6 +17772,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 380 | 290 passed | 83 failed | 7 failed as expected -assertions: 2209 | 2039 passed | 143 failed | 27 failed as expected +test cases: 382 | 292 passed | 83 failed | 7 failed as expected +assertions: 2226 | 2056 passed | 143 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt index 8c8d166f..ad44370c 100644 --- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt @@ -7198,6 +7198,125 @@ with expansion: "expected exception" equals: "should fail" ------------------------------------------------------------------------------- +Multireporter calls reporters and listeners in correct order +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( records == expected ) +with expansion: + { "Hello", "world", "Goodbye", "world" } + == + { "Hello", "world", "Goodbye", "world" } + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == false ) +with expansion: + false == false + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly + Adding listeners +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == false ) +with expansion: + false == false + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly + Adding reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- Nested generators and captured variables ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> @@ -17645,6 +17764,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 380 | 290 passed | 83 failed | 7 failed as expected -assertions: 2209 | 2039 passed | 143 failed | 27 failed as expected +test cases: 382 | 292 passed | 83 failed | 7 failed as expected +assertions: 2226 | 2056 passed | 143 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt index cc3038b5..e3398a6a 100644 --- a/tests/SelfTest/Baselines/junit.sw.approved.txt +++ b/tests/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="126" tests="2209" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="126" tests="2226" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/> @@ -870,6 +870,10 @@ with expansion: Exception.tests.cpp:<line number> </failure> </testcase> + <testcase classname="<exe-name>.global" name="Multireporter calls reporters and listeners in correct order" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Multireporter updates ReporterPreferences properly" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Multireporter updates ReporterPreferences properly/Adding listeners" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Multireporter updates ReporterPreferences properly/Adding reporters" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Nested generators and captured variables" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Nice descriptive name" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Non-std exceptions can be translated" time="{duration}" status="run"> diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt index 22361857..b1ae7efd 100644 --- a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuites> - <testsuite name="<exe-name>" errors="17" failures="126" tests="2209" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="126" tests="2226" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/> @@ -869,6 +869,10 @@ with expansion: Exception.tests.cpp:<line number> </failure> </testcase> + <testcase classname="<exe-name>.global" name="Multireporter calls reporters and listeners in correct order" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Multireporter updates ReporterPreferences properly" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Multireporter updates ReporterPreferences properly/Adding listeners" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Multireporter updates ReporterPreferences properly/Adding reporters" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Nested generators and captured variables" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Nice descriptive name" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Non-std exceptions can be translated" time="{duration}" status="run"> diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index 8ab8d0c0..081ae969 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -181,6 +181,10 @@ <testCase name="Random seed generation reports unknown methods" duration="{duration}"/> </file> <file path="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp"> + <testCase name="Multireporter calls reporters and listeners in correct order" duration="{duration}"/> + <testCase name="Multireporter updates ReporterPreferences properly" duration="{duration}"/> + <testCase name="Multireporter updates ReporterPreferences properly/Adding listeners" duration="{duration}"/> + <testCase name="Multireporter updates ReporterPreferences properly/Adding reporters" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/Automake reporter lists tags" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/Automake reporter lists reporters" duration="{duration}"/> diff --git a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt index ebbdce72..cf9c15ce 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt @@ -180,6 +180,10 @@ <testCase name="Random seed generation reports unknown methods" duration="{duration}"/> </file> <file path="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp"> + <testCase name="Multireporter calls reporters and listeners in correct order" duration="{duration}"/> + <testCase name="Multireporter updates ReporterPreferences properly" duration="{duration}"/> + <testCase name="Multireporter updates ReporterPreferences properly/Adding listeners" duration="{duration}"/> + <testCase name="Multireporter updates ReporterPreferences properly/Adding reporters" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/Automake reporter lists tags" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/Automake reporter lists reporters" duration="{duration}"/> diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index 45fa096a..e49f387e 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -1864,6 +1864,40 @@ not ok {test-number} - explicitly ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" # Mismatching exception messages failing the test not ok {test-number} - thisThrows(), "should fail" for: "expected exception" equals: "should fail" +# Multireporter calls reporters and listeners in correct order +ok {test-number} - records == expected for: { "Hello", "world", "Goodbye", "world" } == { "Hello", "world", "Goodbye", "world" } +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true # Nested generators and captured variables ok {test-number} - values > -6 for: 3 > -6 # Nested generators and captured variables @@ -4420,5 +4454,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2209 +1..2226 diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index 235687a2..f8599833 100644 --- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -1862,6 +1862,40 @@ not ok {test-number} - explicitly ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" # Mismatching exception messages failing the test not ok {test-number} - thisThrows(), "should fail" for: "expected exception" equals: "should fail" +# Multireporter calls reporters and listeners in correct order +ok {test-number} - records == expected for: { "Hello", "world", "Goodbye", "world" } == { "Hello", "world", "Goodbye", "world" } |