mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Renamed TestCaseInfo -> TestCase
This commit is contained in:
		| @@ -120,7 +120,7 @@ namespace Catch { | ||||
|             } | ||||
|         } | ||||
|          | ||||
|         virtual void StartTestCase( const TestCaseInfo& testInfo ) { | ||||
|         virtual void StartTestCase( const TestCase& testInfo ) { | ||||
|             m_testSpan = testInfo.getName(); | ||||
|         } | ||||
|          | ||||
| @@ -264,7 +264,7 @@ namespace Catch { | ||||
|             m_config.stream << std::endl;         | ||||
|         } | ||||
|          | ||||
|         virtual void EndTestCase(   const TestCaseInfo& testInfo,  | ||||
|         virtual void EndTestCase(   const TestCase& testInfo,  | ||||
|                                     const Totals& totals, | ||||
|                                     const std::string& stdOut,  | ||||
|                                     const std::string& stdErr ) { | ||||
|   | ||||
| @@ -38,6 +38,7 @@ namespace Catch { | ||||
|             std::string m_stdOut; | ||||
|             std::string m_stdErr; | ||||
|             std::vector<TestStats> m_testStats; | ||||
|             std::vector<TestCaseStats> m_sections; | ||||
|         }; | ||||
|          | ||||
|         struct Stats { | ||||
| @@ -101,8 +102,9 @@ namespace Catch { | ||||
|  | ||||
|         virtual void EndSection( const std::string&, const Counts& ) {} | ||||
|          | ||||
|         virtual void StartTestCase( const Catch::TestCaseInfo& testInfo ) { | ||||
|         virtual void StartTestCase( const Catch::TestCase& testInfo ) { | ||||
|             m_currentStats->m_testCaseStats.push_back( TestCaseStats( testInfo.getClassName(), testInfo.getName() ) ); | ||||
|             m_currentTestCaseStats.push_back( &m_currentStats->m_testCaseStats.back() ); | ||||
|         } | ||||
|          | ||||
|         virtual void Result( const Catch::AssertionResult& assertionResult ) { | ||||
| @@ -149,7 +151,9 @@ namespace Catch { | ||||
|             } | ||||
|         } | ||||
|          | ||||
|         virtual void EndTestCase( const Catch::TestCaseInfo&, const Totals&, const std::string& stdOut, const std::string& stdErr ) { | ||||
|         virtual void EndTestCase( const Catch::TestCase&, const Totals&, const std::string& stdOut, const std::string& stdErr ) { | ||||
|             m_currentTestCaseStats.pop_back(); | ||||
|             assert( m_currentTestCaseStats.empty() ); | ||||
|             TestCaseStats& testCaseStats = m_currentStats->m_testCaseStats.back(); | ||||
|             testCaseStats.m_stdOut = stdOut; | ||||
|             testCaseStats.m_stdErr = stdErr; | ||||
| @@ -236,6 +240,7 @@ namespace Catch { | ||||
|         Stats m_testSuiteStats; | ||||
|         Stats* m_currentStats; | ||||
|         std::vector<Stats> m_statsForSuites; | ||||
|         std::vector<const TestCaseStats*> m_currentTestCaseStats; | ||||
|         std::ostringstream m_stdOut; | ||||
|         std::ostringstream m_stdErr; | ||||
|     }; | ||||
|   | ||||
| @@ -70,7 +70,7 @@ namespace Catch { | ||||
|             m_xml.endElement(); | ||||
|         } | ||||
|          | ||||
|         virtual void StartTestCase( const Catch::TestCaseInfo& testInfo ) { | ||||
|         virtual void StartTestCase( const Catch::TestCase& testInfo ) { | ||||
|             m_xml.startElement( "TestCase" ).writeAttribute( "name", testInfo.getName() ); | ||||
|             m_currentTestSuccess = true; | ||||
|         } | ||||
| @@ -129,7 +129,7 @@ namespace Catch { | ||||
|             // !TBD | ||||
|         } | ||||
|          | ||||
|         virtual void EndTestCase( const Catch::TestCaseInfo&, const Totals&, const std::string&, const std::string& ) { | ||||
|         virtual void EndTestCase( const Catch::TestCase&, const Totals&, const std::string&, const std::string& ) { | ||||
|             m_xml.scopedElement( "OverallResult" ).writeAttribute( "success", m_currentTestSuccess ); | ||||
|             m_xml.endElement(); | ||||
|         }     | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash