mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-03 21:49:32 +01:00 
			
		
		
		
	Added Listeners (programatically provided extra reporters)
This commit is contained in:
		@@ -798,5 +798,5 @@ with expansion:
 | 
			
		||||
 | 
			
		||||
===============================================================================
 | 
			
		||||
test cases: 159 | 119 passed | 39 failed |  1 failed as expected
 | 
			
		||||
assertions: 784 | 691 passed | 80 failed | 13 failed as expected
 | 
			
		||||
assertions: 788 | 695 passed | 80 failed | 13 failed as expected
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3929,7 +3929,7 @@ with expansion:
 | 
			
		||||
 | 
			
		||||
TestMain.cpp:<line number>:
 | 
			
		||||
PASSED:
 | 
			
		||||
  CHECK( config.reporterName.empty() )
 | 
			
		||||
  CHECK( config.reporterNames.empty() )
 | 
			
		||||
with expansion:
 | 
			
		||||
  true
 | 
			
		||||
 | 
			
		||||
@@ -4019,7 +4019,7 @@ PASSED:
 | 
			
		||||
 | 
			
		||||
TestMain.cpp:<line number>:
 | 
			
		||||
PASSED:
 | 
			
		||||
  REQUIRE( config.reporterName == "console" )
 | 
			
		||||
  REQUIRE( config.reporterNames[0] == "console" )
 | 
			
		||||
with expansion:
 | 
			
		||||
  "console" == "console"
 | 
			
		||||
 | 
			
		||||
@@ -4037,10 +4037,40 @@ PASSED:
 | 
			
		||||
 | 
			
		||||
TestMain.cpp:<line number>:
 | 
			
		||||
PASSED:
 | 
			
		||||
  REQUIRE( config.reporterName == "xml" )
 | 
			
		||||
  REQUIRE( config.reporterNames[0] == "xml" )
 | 
			
		||||
with expansion:
 | 
			
		||||
  "xml" == "xml"
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
Process can be configured on command line
 | 
			
		||||
  reporter
 | 
			
		||||
  -r xml and junit
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
TestMain.cpp:<line number>
 | 
			
		||||
...............................................................................
 | 
			
		||||
 | 
			
		||||
TestMain.cpp:<line number>:
 | 
			
		||||
PASSED:
 | 
			
		||||
  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
 | 
			
		||||
 | 
			
		||||
TestMain.cpp:<line number>:
 | 
			
		||||
PASSED:
 | 
			
		||||
  REQUIRE( config.reporterNames.size() == 2 )
 | 
			
		||||
with expansion:
 | 
			
		||||
  2 == 2
 | 
			
		||||
 | 
			
		||||
TestMain.cpp:<line number>:
 | 
			
		||||
PASSED:
 | 
			
		||||
  REQUIRE( config.reporterNames[0] == "xml" )
 | 
			
		||||
with expansion:
 | 
			
		||||
  "xml" == "xml"
 | 
			
		||||
 | 
			
		||||
TestMain.cpp:<line number>:
 | 
			
		||||
PASSED:
 | 
			
		||||
  REQUIRE( config.reporterNames[1] == "junit" )
 | 
			
		||||
with expansion:
 | 
			
		||||
  "junit" == "junit"
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
Process can be configured on command line
 | 
			
		||||
  reporter
 | 
			
		||||
@@ -4055,7 +4085,7 @@ PASSED:
 | 
			
		||||
 | 
			
		||||
TestMain.cpp:<line number>:
 | 
			
		||||
PASSED:
 | 
			
		||||
  REQUIRE( config.reporterName == "junit" )
 | 
			
		||||
  REQUIRE( config.reporterNames[0] == "junit" )
 | 
			
		||||
with expansion:
 | 
			
		||||
  "junit" == "junit"
 | 
			
		||||
 | 
			
		||||
@@ -8141,5 +8171,5 @@ with expansion:
 | 
			
		||||
 | 
			
		||||
===============================================================================
 | 
			
		||||
test cases: 159 | 103 passed |  55 failed |  1 failed as expected
 | 
			
		||||
assertions: 804 | 691 passed | 100 failed | 13 failed as expected
 | 
			
		||||
assertions: 808 | 695 passed | 100 failed | 13 failed as expected
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
<testsuites>
 | 
			
		||||
  <testsuite name="CatchSelfTest" errors="12" failures="88" tests="804" hostname="tbd" time="{duration}" timestamp="tbd">
 | 
			
		||||
  <testsuite name="CatchSelfTest" errors="12" failures="88" tests="808" hostname="tbd" time="{duration}" timestamp="tbd">
 | 
			
		||||
    <testcase classname="global" name="toString(enum)" time="{duration}"/>
 | 
			
		||||
    <testcase classname="global" name="toString(enum w/operator<<)" time="{duration}"/>
 | 
			
		||||
    <testcase classname="global" name="toString(enum class)" time="{duration}"/>
 | 
			
		||||
@@ -478,6 +478,7 @@ MiscTests.cpp:<line number>
 | 
			
		||||
    <testcase classname="Process can be configured on command line" name="test lists/Specify one test case exclusion using ~" time="{duration}"/>
 | 
			
		||||
    <testcase classname="Process can be configured on command line" name="reporter/-r/console" time="{duration}"/>
 | 
			
		||||
    <testcase classname="Process can be configured on command line" name="reporter/-r/xml" time="{duration}"/>
 | 
			
		||||
    <testcase classname="Process can be configured on command line" name="reporter/-r xml and junit" time="{duration}"/>
 | 
			
		||||
    <testcase classname="Process can be configured on command line" name="reporter/--reporter/junit" time="{duration}"/>
 | 
			
		||||
    <testcase classname="Process can be configured on command line" name="debugger/-b" time="{duration}"/>
 | 
			
		||||
    <testcase classname="Process can be configured on command line" name="debugger/--break" time="{duration}"/>
 | 
			
		||||
 
 | 
			
		||||
@@ -4013,7 +4013,7 @@
 | 
			
		||||
        </Expression>
 | 
			
		||||
        <Expression success="true" type="CHECK" filename="projects/SelfTest/TestMain.cpp" >
 | 
			
		||||
          <Original>
 | 
			
		||||
            config.reporterName.empty()
 | 
			
		||||
            config.reporterNames.empty()
 | 
			
		||||
          </Original>
 | 
			
		||||
          <Expanded>
 | 
			
		||||
            true
 | 
			
		||||
@@ -4123,7 +4123,7 @@
 | 
			
		||||
          </Expression>
 | 
			
		||||
          <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
 | 
			
		||||
            <Original>
 | 
			
		||||
              config.reporterName == "console"
 | 
			
		||||
              config.reporterNames[0] == "console"
 | 
			
		||||
            </Original>
 | 
			
		||||
            <Expanded>
 | 
			
		||||
              "console" == "console"
 | 
			
		||||
@@ -4145,7 +4145,7 @@
 | 
			
		||||
          </Expression>
 | 
			
		||||
          <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
 | 
			
		||||
            <Original>
 | 
			
		||||
              config.reporterName == "xml"
 | 
			
		||||
              config.reporterNames[0] == "xml"
 | 
			
		||||
            </Original>
 | 
			
		||||
            <Expanded>
 | 
			
		||||
              "xml" == "xml"
 | 
			
		||||
@@ -4155,6 +4155,44 @@
 | 
			
		||||
        </Section>
 | 
			
		||||
        <OverallResults successes="2" failures="0" expectedFailures="0"/>
 | 
			
		||||
      </Section>
 | 
			
		||||
      <Section name="reporter">
 | 
			
		||||
        <Section name="-r xml and junit">
 | 
			
		||||
          <Expression success="true" type="CHECK_NOTHROW" filename="projects/SelfTest/TestMain.cpp" >
 | 
			
		||||
            <Original>
 | 
			
		||||
              parseIntoConfig( argv, config )
 | 
			
		||||
            </Original>
 | 
			
		||||
            <Expanded>
 | 
			
		||||
              parseIntoConfig( argv, config )
 | 
			
		||||
            </Expanded>
 | 
			
		||||
          </Expression>
 | 
			
		||||
          <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
 | 
			
		||||
            <Original>
 | 
			
		||||
              config.reporterNames.size() == 2
 | 
			
		||||
            </Original>
 | 
			
		||||
            <Expanded>
 | 
			
		||||
              2 == 2
 | 
			
		||||
            </Expanded>
 | 
			
		||||
          </Expression>
 | 
			
		||||
          <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
 | 
			
		||||
            <Original>
 | 
			
		||||
              config.reporterNames[0] == "xml"
 | 
			
		||||
            </Original>
 | 
			
		||||
            <Expanded>
 | 
			
		||||
              "xml" == "xml"
 | 
			
		||||
            </Expanded>
 | 
			
		||||
          </Expression>
 | 
			
		||||
          <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
 | 
			
		||||
            <Original>
 | 
			
		||||
              config.reporterNames[1] == "junit"
 | 
			
		||||
            </Original>
 | 
			
		||||
            <Expanded>
 | 
			
		||||
              "junit" == "junit"
 | 
			
		||||
            </Expanded>
 | 
			
		||||
          </Expression>
 | 
			
		||||
          <OverallResults successes="4" failures="0" expectedFailures="0"/>
 | 
			
		||||
        </Section>
 | 
			
		||||
        <OverallResults successes="4" failures="0" expectedFailures="0"/>
 | 
			
		||||
      </Section>
 | 
			
		||||
      <Section name="reporter">
 | 
			
		||||
        <Section name="--reporter/junit">
 | 
			
		||||
          <Expression success="true" type="CHECK_NOTHROW" filename="projects/SelfTest/TestMain.cpp" >
 | 
			
		||||
@@ -4167,7 +4205,7 @@
 | 
			
		||||
          </Expression>
 | 
			
		||||
          <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
 | 
			
		||||
            <Original>
 | 
			
		||||
              config.reporterName == "junit"
 | 
			
		||||
              config.reporterNames[0] == "junit"
 | 
			
		||||
            </Original>
 | 
			
		||||
            <Expanded>
 | 
			
		||||
              "junit" == "junit"
 | 
			
		||||
@@ -8425,7 +8463,7 @@ there"
 | 
			
		||||
      </Section>
 | 
			
		||||
      <OverallResult success="true"/>
 | 
			
		||||
    </TestCase>
 | 
			
		||||
    <OverallResults successes="691" failures="100" expectedFailures="13"/>
 | 
			
		||||
    <OverallResults successes="695" failures="100" expectedFailures="13"/>
 | 
			
		||||
  </Group>
 | 
			
		||||
  <OverallResults successes="691" failures="100" expectedFailures="13"/>
 | 
			
		||||
  <OverallResults successes="695" failures="100" expectedFailures="13"/>
 | 
			
		||||
</Catch>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user