mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Removed stream name from config
This commit is contained in:
		| @@ -76,9 +76,6 @@ namespace Catch { | ||||
|  | ||||
|     private: | ||||
|         void openStream() { | ||||
|             if( !m_config->getStreamName().empty() ) | ||||
|                 m_config->useStream( m_config->getStreamName() ); | ||||
|  | ||||
|             // Open output file, if specified | ||||
|             if( !m_config->getFilename().empty() ) { | ||||
|                 m_ofs.open( m_config->getFilename().c_str() ); | ||||
|   | ||||
| @@ -413,9 +413,6 @@ namespace Catch { | ||||
|                                         "OutputDebugString is supported)."; | ||||
|             } | ||||
|             virtual void parseIntoConfig( Command const& cmd, ConfigData& config ) { | ||||
|                 if( cmd[0][0] == '%' ) | ||||
|                     config.stream = cmd[0].substr( 1 ); | ||||
|                 else | ||||
|                 config.outputFilename = cmd[0]; | ||||
|             } | ||||
|         }; | ||||
|   | ||||
| @@ -69,8 +69,6 @@ namespace Catch { | ||||
|         std::string name; | ||||
|  | ||||
|         std::vector<std::string> testsOrTags; | ||||
|  | ||||
|         std::string stream; | ||||
|     }; | ||||
|      | ||||
|      | ||||
| @@ -142,8 +140,6 @@ namespace Catch { | ||||
|             m_stream = stream; | ||||
|         } | ||||
|          | ||||
|         std::string getStreamName() const { return m_data.stream; } | ||||
|  | ||||
|         std::string getReporterName() const { return m_data.reporter; } | ||||
|  | ||||
|         void addTestSpec( std::string const& testSpec ) { | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -256,20 +256,12 @@ TEST_CASE( "selftest/parser/2", "ConfigData" ) { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     SECTION( "streams", "" ) { | ||||
|     SECTION( "output filename", "" ) { | ||||
|         SECTION( "-o filename", "" ) { | ||||
|             const char* argv[] = { "test", "-o", "filename.ext" }; | ||||
|             CHECK_NOTHROW( parseIntoConfig( argv, config ) ); | ||||
|  | ||||
|             REQUIRE( config.outputFilename == "filename.ext" ); | ||||
|             REQUIRE( config.stream.empty() ); | ||||
|         } | ||||
|         SECTION( "-o %stdout", "" ) { | ||||
|             const char* argv[] = { "test", "-o", "%stdout" }; | ||||
|             CHECK_NOTHROW( parseIntoConfig( argv, config ) ); | ||||
|  | ||||
|             REQUIRE( config.stream == "stdout" ); | ||||
|             REQUIRE( config.outputFilename.empty() ); | ||||
|         } | ||||
|         SECTION( "--out", "" ) { | ||||
|             const char* argv[] = { "test", "--out", "filename.ext" }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash