diff options
| author | Martin Hořeňovský | 2022-03-21 00:22:54 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-03-24 16:02:51 +0100 |
| commit | 4d8acafecb973d9b03178346c3f1566fe7485fb1 (patch) | |
| tree | 9d3ffd8440bdc530785e81e1a140c0738d9e8f8c /tests/SelfTest | |
| parent | cf6dd937ab2ff62d29b34d62411cfd03d3822021 (diff) | |
| download | catch3-4d8acafecb973d9b03178346c3f1566fe7485fb1.tar.gz | |
Rename isStdout => isConsole and add doccomment
Diffstat (limited to 'tests/SelfTest')
9 files changed, 36 insertions, 36 deletions
diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index 9a32e6ca..723e6470 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -479,7 +479,7 @@ Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1 Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1 Generators.tests.cpp:<line number>: passed: call_count == 1 for: 1 == 1 Generators.tests.cpp:<line number>: passed: make_data().size() == test_count for: 6 == 6 -Stream.tests.cpp:<line number>: passed: Catch::makeStream( "-" )->isStdout() for: true +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "-" )->isConsole() for: true Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom() Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom(), std::exception Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom std exception' @@ -490,7 +490,7 @@ ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: V ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" -Stream.tests.cpp:<line number>: passed: Catch::makeStream( "" )->isStdout() for: true +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "" )->isConsole() for: true Tag.tests.cpp:<line number>: passed: Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) @@ -2368,8 +2368,8 @@ ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify( set ) ToStringPair.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" == "{ { "green", 55 } }" -Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%stderr" )->isStdout() for: true -Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%stdout" )->isStdout() for: true +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%stderr" )->isConsole() for: true +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%stdout" )->isConsole() for: true ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" == "op<<(streamable_range)" diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt index 4b54102b..a39bbfdc 100644 --- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt @@ -477,7 +477,7 @@ Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1 Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1 Generators.tests.cpp:<line number>: passed: call_count == 1 for: 1 == 1 Generators.tests.cpp:<line number>: passed: make_data().size() == test_count for: 6 == 6 -Stream.tests.cpp:<line number>: passed: Catch::makeStream( "-" )->isStdout() for: true +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "-" )->isConsole() for: true Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom() Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom(), std::exception Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom std exception' @@ -488,7 +488,7 @@ ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: V ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" -Stream.tests.cpp:<line number>: passed: Catch::makeStream( "" )->isStdout() for: true +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "" )->isConsole() for: true Tag.tests.cpp:<line number>: passed: Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) @@ -2360,8 +2360,8 @@ ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify( set ) ToStringPair.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" == "{ { "green", 55 } }" -Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%stderr" )->isStdout() for: true -Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%stdout" )->isStdout() for: true +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%stderr" )->isConsole() for: true +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%stdout" )->isConsole() for: true ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" == "op<<(streamable_range)" diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt index c17023ac..256d347d 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -3812,7 +3812,7 @@ Stream.tests.cpp:<line number> ............................................................................... Stream.tests.cpp:<line number>: PASSED: - REQUIRE( Catch::makeStream( "-" )->isStdout() ) + REQUIRE( Catch::makeStream( "-" )->isConsole() ) with expansion: true @@ -3894,7 +3894,7 @@ Stream.tests.cpp:<line number> ............................................................................... Stream.tests.cpp:<line number>: PASSED: - REQUIRE( Catch::makeStream( "" )->isStdout() ) + REQUIRE( Catch::makeStream( "" )->isConsole() ) with expansion: true @@ -16859,12 +16859,12 @@ Stream.tests.cpp:<line number> ............................................................................... Stream.tests.cpp:<line number>: PASSED: - REQUIRE( Catch::makeStream( "%stderr" )->isStdout() ) + REQUIRE( Catch::makeStream( "%stderr" )->isConsole() ) with expansion: true Stream.tests.cpp:<line number>: PASSED: - REQUIRE( Catch::makeStream( "%stdout" )->isStdout() ) + REQUIRE( Catch::makeStream( "%stdout" )->isConsole() ) with expansion: true diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt index d034ed27..27975ad9 100644 --- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt @@ -3810,7 +3810,7 @@ Stream.tests.cpp:<line number> ............................................................................... Stream.tests.cpp:<line number>: PASSED: - REQUIRE( Catch::makeStream( "-" )->isStdout() ) + REQUIRE( Catch::makeStream( "-" )->isConsole() ) with expansion: true @@ -3892,7 +3892,7 @@ Stream.tests.cpp:<line number> ............................................................................... Stream.tests.cpp:<line number>: PASSED: - REQUIRE( Catch::makeStream( "" )->isStdout() ) + REQUIRE( Catch::makeStream( "" )->isConsole() ) with expansion: true @@ -16851,12 +16851,12 @@ Stream.tests.cpp:<line number> ............................................................................... Stream.tests.cpp:<line number>: PASSED: - REQUIRE( Catch::makeStream( "%stderr" )->isStdout() ) + REQUIRE( Catch::makeStream( "%stderr" )->isConsole() ) with expansion: true Stream.tests.cpp:<line number>: PASSED: - REQUIRE( Catch::makeStream( "%stdout" )->isStdout() ) + REQUIRE( Catch::makeStream( "%stdout" )->isConsole() ) with expansion: true diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index 97f7df9b..3080c4a5 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -957,7 +957,7 @@ ok {test-number} - call_count == 1 for: 1 == 1 # Copy and then generate a range ok {test-number} - make_data().size() == test_count for: 6 == 6 # Cout stream properly declares it writes to stdout -ok {test-number} - Catch::makeStream( "-" )->isStdout() for: true +ok {test-number} - Catch::makeStream( "-" )->isConsole() for: true # Custom exceptions can be translated when testing for nothrow not ok {test-number} - unexpected exception with message: 'custom exception - not std'; expression was: throwCustom() # Custom exceptions can be translated when testing for throwing as something else @@ -975,7 +975,7 @@ ok {test-number} - enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" # Directly creating an EnumInfo ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" # Empty stream name opens cout stream -ok {test-number} - Catch::makeStream( "" )->isStdout() for: true +ok {test-number} - Catch::makeStream( "" )->isConsole() for: true # Empty tag is not allowed ok {test-number} - Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) # EndsWith string matcher @@ -4245,9 +4245,9 @@ ok {test-number} - Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi # std::vector<std::pair<std::string,int> > -> toString ok {test-number} - ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" == "{ { "green", 55 } }" # stdout and stderr streams have %-starting name -ok {test-number} - Catch::makeStream( "%stderr" )->isStdout() for: true +ok {test-number} - Catch::makeStream( "%stderr" )->isConsole() for: true # stdout and stderr streams have %-starting name -ok {test-number} - Catch::makeStream( "%stdout" )->isStdout() for: true +ok {test-number} - Catch::makeStream( "%stdout" )->isConsole() for: true # stringify ranges ok {test-number} - ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" == "op<<(streamable_range)" # stringify ranges diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index ca6dfc81..60011180 100644 --- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -955,7 +955,7 @@ ok {test-number} - call_count == 1 for: 1 == 1 # Copy and then generate a range ok {test-number} - make_data().size() == test_count for: 6 == 6 # Cout stream properly declares it writes to stdout -ok {test-number} - Catch::makeStream( "-" )->isStdout() for: true +ok {test-number} - Catch::makeStream( "-" )->isConsole() for: true # Custom exceptions can be translated when testing for nothrow not ok {test-number} - unexpected exception with message: 'custom exception - not std'; expression was: throwCustom() # Custom exceptions can be translated when testing for throwing as something else @@ -973,7 +973,7 @@ ok {test-number} - enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" # Directly creating an EnumInfo ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" # Empty stream name opens cout stream -ok {test-number} - Catch::makeStream( "" )->isStdout() for: true +ok {test-number} - Catch::makeStream( "" )->isConsole() for: true # Empty tag is not allowed ok {test-number} - Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) # EndsWith string matcher @@ -4237,9 +4237,9 @@ ok {test-number} - Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi # std::vector<std::pair<std::string,int> > -> toString ok {test-number} - ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" == "{ { "green", 55 } }" # stdout and stderr streams have %-starting name -ok {test-number} - Catch::makeStream( "%stderr" )->isStdout() for: true +ok {test-number} - Catch::makeStream( "%stderr" )->isConsole() for: true # stdout and stderr streams have %-starting name -ok {test-number} - Catch::makeStream( "%stdout" )->isStdout() for: true +ok {test-number} - Catch::makeStream( "%stdout" )->isConsole() for: true # stringify ranges ok {test-number} - ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" == "op<<(streamable_range)" # stringify ranges diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index 0de045c7..5a028632 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -4208,7 +4208,7 @@ Nor would this <TestCase name="Cout stream properly declares it writes to stdout" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Original> - Catch::makeStream( "-" )->isStdout() + Catch::makeStream( "-" )->isConsole() </Original> <Expanded> true @@ -4301,7 +4301,7 @@ Nor would this <TestCase name="Empty stream name opens cout stream" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Original> - Catch::makeStream( "" )->isStdout() + Catch::makeStream( "" )->isConsole() </Original> <Expanded> true @@ -19885,7 +19885,7 @@ loose text artifact <TestCase name="stdout and stderr streams have %-starting name" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Original> - Catch::makeStream( "%stderr" )->isStdout() + Catch::makeStream( "%stderr" )->isConsole() </Original> <Expanded> true @@ -19893,7 +19893,7 @@ loose text artifact </Expression> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Original> - Catch::makeStream( "%stdout" )->isStdout() + Catch::makeStream( "%stdout" )->isConsole() </Original> <Expanded> true diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt index b685fcc5..da925a2f 100644 --- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt @@ -4208,7 +4208,7 @@ Nor would this <TestCase name="Cout stream properly declares it writes to stdout" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Original> - Catch::makeStream( "-" )->isStdout() + Catch::makeStream( "-" )->isConsole() </Original> <Expanded> true @@ -4301,7 +4301,7 @@ Nor would this <TestCase name="Empty stream name opens cout stream" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Original> - Catch::makeStream( "" )->isStdout() + Catch::makeStream( "" )->isConsole() </Original> <Expanded> true @@ -19884,7 +19884,7 @@ There is no extra whitespace here <TestCase name="stdout and stderr streams have %-starting name" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Original> - Catch::makeStream( "%stderr" )->isStdout() + Catch::makeStream( "%stderr" )->isConsole() </Original> <Expanded> true @@ -19892,7 +19892,7 @@ There is no extra whitespace here </Expression> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Original> - Catch::makeStream( "%stdout" )->isStdout() + Catch::makeStream( "%stdout" )->isConsole() </Original> <Expanded> true diff --git a/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp index 4ba08ee5..9d647b0d 100644 --- a/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp @@ -11,16 +11,16 @@ #include <catch2/internal/catch_stream.hpp> TEST_CASE( "Cout stream properly declares it writes to stdout", "[streams]" ) { - REQUIRE( Catch::makeStream( "-" )->isStdout() ); + REQUIRE( Catch::makeStream( "-" )->isConsole() ); } TEST_CASE( "Empty stream name opens cout stream", "[streams]" ) { - REQUIRE( Catch::makeStream( "" )->isStdout() ); + REQUIRE( Catch::makeStream( "" )->isConsole() ); } TEST_CASE( "stdout and stderr streams have %-starting name", "[streams]" ) { - REQUIRE( Catch::makeStream( "%stderr" )->isStdout() ); - REQUIRE( Catch::makeStream( "%stdout" )->isStdout() ); + REQUIRE( Catch::makeStream( "%stderr" )->isConsole() ); + REQUIRE( Catch::makeStream( "%stdout" )->isConsole() ); } TEST_CASE( "request an unknown %-starting stream fails", "[streams]" ) { |