mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Add stream flushes after reporters print out the test run metadata.
This ensures that the test run metadata are printed even if the process dies right after. Closes #2964
This commit is contained in:
		| @@ -215,7 +215,8 @@ private: | ||||
|                          << m_config->testSpec() | ||||
|                          << '\n'; | ||||
|             } | ||||
|             m_stream << "RNG seed: " << getSeed() << '\n'; | ||||
|             m_stream << "RNG seed: " << getSeed() << '\n' | ||||
|                      << std::flush; | ||||
|         } | ||||
|  | ||||
|         void CompactReporter::assertionEnded( AssertionStats const& _assertionStats ) { | ||||
|   | ||||
| @@ -529,7 +529,8 @@ void ConsoleReporter::testRunStarting(TestRunInfo const& _testRunInfo) { | ||||
|         m_stream << m_colour->guardColour( Colour::BrightYellow ) << "Filters: " | ||||
|                  << m_config->testSpec() << '\n'; | ||||
|     } | ||||
|     m_stream << "Randomness seeded to: " << getSeed() << '\n'; | ||||
|     m_stream << "Randomness seeded to: " << getSeed() << '\n' | ||||
|              << std::flush; | ||||
| } | ||||
|  | ||||
| void ConsoleReporter::lazyPrint() { | ||||
|   | ||||
| @@ -196,7 +196,8 @@ namespace Catch { | ||||
|         if ( m_config->testSpec().hasFilters() ) { | ||||
|             m_stream << "# filters: " << m_config->testSpec() << '\n'; | ||||
|         } | ||||
|         m_stream << "# rng-seed: " << m_config->rngSeed() << '\n'; | ||||
|         m_stream << "# rng-seed: " << m_config->rngSeed() << '\n' | ||||
|                  << std::flush; | ||||
|     } | ||||
|  | ||||
|     void TAPReporter::noMatchingTestCases( StringRef unmatchedSpec ) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský