mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Slight improvement for reporter test
This commit is contained in:
		| @@ -1888,10 +1888,10 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("[fa | ||||
| 1 tag | ||||
|  | ||||
| " contains: "[fakeTag]" | ||||
| Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: | ||||
| Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) for: "Available reporters: | ||||
|   fake reporter:  fake description | ||||
|  | ||||
| " contains: "fake reporter" | ||||
| " ( contains: "fake reporter" and contains: "fake description" ) | ||||
| Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: | ||||
|   fake test name | ||||
|       [fakeTestTag] | ||||
|   | ||||
| @@ -1881,10 +1881,10 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("[fa | ||||
| 1 tag | ||||
|  | ||||
| " contains: "[fakeTag]" | ||||
| Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: | ||||
| Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) for: "Available reporters: | ||||
|   fake reporter:  fake description | ||||
|  | ||||
| " contains: "fake reporter" | ||||
| " ( contains: "fake reporter" and contains: "fake description" ) | ||||
| Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: | ||||
|   fake test name | ||||
|       [fakeTestTag] | ||||
|   | ||||
| @@ -13420,12 +13420,12 @@ Reporters.tests.cpp:<line number> | ||||
| ............................................................................... | ||||
|  | ||||
| Reporters.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) | ||||
|   REQUIRE_THAT( listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) ) | ||||
| with expansion: | ||||
|   "Available reporters: | ||||
|     fake reporter:  fake description | ||||
|  | ||||
| " contains: "fake reporter" | ||||
| " ( contains: "fake reporter" and contains: "fake description" ) | ||||
|  | ||||
| ------------------------------------------------------------------------------- | ||||
| The default listing implementation write to provided stream | ||||
|   | ||||
| @@ -13413,12 +13413,12 @@ Reporters.tests.cpp:<line number> | ||||
| ............................................................................... | ||||
|  | ||||
| Reporters.tests.cpp:<line number>: PASSED: | ||||
|   REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) | ||||
|   REQUIRE_THAT( listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) ) | ||||
| with expansion: | ||||
|   "Available reporters: | ||||
|     fake reporter:  fake description | ||||
|  | ||||
| " contains: "fake reporter" | ||||
| " ( contains: "fake reporter" and contains: "fake description" ) | ||||
|  | ||||
| ------------------------------------------------------------------------------- | ||||
| The default listing implementation write to provided stream | ||||
|   | ||||
| @@ -3335,7 +3335,7 @@ ok {test-number} - 1 == 2  # TODO | ||||
| # The default listing implementation write to provided stream | ||||
| ok {test-number} - listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags:    1  [fakeTag] 1 tag  " contains: "[fakeTag]" | ||||
| # The default listing implementation write to provided stream | ||||
| ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters:   fake reporter:  fake description  " contains: "fake reporter" | ||||
| ok {test-number} - listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) for: "Available reporters:   fake reporter:  fake description  " ( contains: "fake reporter" and contains: "fake description" ) | ||||
| # The default listing implementation write to provided stream | ||||
| ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases:   fake test name       [fakeTestTag] 1 test case  " ( contains: "fake test name" and contains: "fakeTestTag" ) | ||||
| # This test 'should' fail but doesn't | ||||
|   | ||||
| @@ -3328,7 +3328,7 @@ ok {test-number} - 1 == 2  # TODO | ||||
| # The default listing implementation write to provided stream | ||||
| ok {test-number} - listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags:    1  [fakeTag] 1 tag  " contains: "[fakeTag]" | ||||
| # The default listing implementation write to provided stream | ||||
| ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters:   fake reporter:  fake description  " contains: "fake reporter" | ||||
| ok {test-number} - listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) for: "Available reporters:   fake reporter:  fake description  " ( contains: "fake reporter" and contains: "fake description" ) | ||||
| # The default listing implementation write to provided stream | ||||
| ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases:   fake test name       [fakeTestTag] 1 test case  " ( contains: "fake test name" and contains: "fakeTestTag" ) | ||||
| # This test 'should' fail but doesn't | ||||
|   | ||||
| @@ -15727,13 +15727,13 @@ Message from section two | ||||
|     <Section name="Listing reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > | ||||
|       <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > | ||||
|         <Original> | ||||
|           listingString, ContainsSubstring("fake reporter"s) | ||||
|           listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           "Available reporters: | ||||
|   fake reporter:  fake description | ||||
|  | ||||
| " contains: "fake reporter" | ||||
| " ( contains: "fake reporter" and contains: "fake description" ) | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <OverallResults successes="1" failures="0" expectedFailures="0"/> | ||||
|   | ||||
| @@ -15727,13 +15727,13 @@ Message from section two | ||||
|     <Section name="Listing reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > | ||||
|       <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > | ||||
|         <Original> | ||||
|           listingString, ContainsSubstring("fake reporter"s) | ||||
|           listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) | ||||
|         </Original> | ||||
|         <Expanded> | ||||
|           "Available reporters: | ||||
|   fake reporter:  fake description | ||||
|  | ||||
| " contains: "fake reporter" | ||||
| " ( contains: "fake reporter" and contains: "fake description" ) | ||||
|         </Expanded> | ||||
|       </Expression> | ||||
|       <OverallResults successes="1" failures="0" expectedFailures="0"/> | ||||
|   | ||||
| @@ -66,7 +66,9 @@ TEST_CASE( "The default listing implementation write to provided stream", | ||||
|         Catch::defaultListReporters(sstream.stream(), reporters, Catch::Verbosity::Normal); | ||||
|  | ||||
|         auto listingString = sstream.str(); | ||||
|         REQUIRE_THAT(listingString, ContainsSubstring("fake reporter"s)); | ||||
|         REQUIRE_THAT( listingString, | ||||
|                       ContainsSubstring( "fake reporter"s ) && | ||||
|                           ContainsSubstring( "fake description"s ) ); | ||||
|     } | ||||
|     SECTION( "Listing tests" ) { | ||||
|         Catch::TestCaseInfo fakeInfo{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský