Rebased approvals following colour changes

This commit is contained in:
Phil Nash 2016-02-29 08:13:27 +00:00
parent 458f37ed57
commit f895e0d95f
4 changed files with 132 additions and 23 deletions

View File

@ -831,5 +831,5 @@ with expansion:
=============================================================================== ===============================================================================
test cases: 167 | 124 passed | 42 failed | 1 failed as expected test cases: 167 | 124 passed | 42 failed | 1 failed as expected
assertions: 914 | 818 passed | 83 failed | 13 failed as expected assertions: 919 | 823 passed | 83 failed | 13 failed as expected

View File

@ -4348,8 +4348,8 @@ with expansion:
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Process can be configured on command line Process can be configured on command line
force-colour use-colour
--force-colour without option
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
TestMain.cpp:<line number> TestMain.cpp:<line number>
............................................................................... ...............................................................................
@ -4360,14 +4360,14 @@ PASSED:
TestMain.cpp:<line number>: TestMain.cpp:<line number>:
PASSED: PASSED:
REQUIRE( config.forceColour ) REQUIRE( config.useColour == UseColour::Auto )
with expansion: with expansion:
true 0 == 0
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Process can be configured on command line Process can be configured on command line
force-colour use-colour
without --force-colour auto
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
TestMain.cpp:<line number> TestMain.cpp:<line number>
............................................................................... ...............................................................................
@ -4378,9 +4378,57 @@ PASSED:
TestMain.cpp:<line number>: TestMain.cpp:<line number>:
PASSED: PASSED:
REQUIRE( !config.forceColour ) REQUIRE( config.useColour == UseColour::Auto )
with expansion: with expansion:
true 0 == 0
-------------------------------------------------------------------------------
Process can be configured on command line
use-colour
yes
-------------------------------------------------------------------------------
TestMain.cpp:<line number>
...............................................................................
TestMain.cpp:<line number>:
PASSED:
CHECK_NOTHROW( parseIntoConfig( argv, config ) )
TestMain.cpp:<line number>:
PASSED:
REQUIRE( config.useColour == UseColour::Yes )
with expansion:
1 == 1
-------------------------------------------------------------------------------
Process can be configured on command line
use-colour
no
-------------------------------------------------------------------------------
TestMain.cpp:<line number>
...............................................................................
TestMain.cpp:<line number>:
PASSED:
CHECK_NOTHROW( parseIntoConfig( argv, config ) )
TestMain.cpp:<line number>:
PASSED:
REQUIRE( config.useColour == UseColour::No )
with expansion:
2 == 2
-------------------------------------------------------------------------------
Process can be configured on command line
use-colour
error
-------------------------------------------------------------------------------
TestMain.cpp:<line number>
...............................................................................
TestMain.cpp:<line number>:
PASSED:
REQUIRE_THROWS_WITH( parseIntoConfig( argv, config ), Contains( "colour mode must be one of" ) )
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Long strings can be wrapped Long strings can be wrapped
@ -9046,5 +9094,5 @@ with expansion:
=============================================================================== ===============================================================================
test cases: 167 | 123 passed | 43 failed | 1 failed as expected test cases: 167 | 123 passed | 43 failed | 1 failed as expected
assertions: 916 | 818 passed | 85 failed | 13 failed as expected assertions: 921 | 823 passed | 85 failed | 13 failed as expected

View File

@ -1,5 +1,5 @@
<testsuites> <testsuites>
<testsuite name="CatchSelfTest" errors="13" failures="72" tests="916" hostname="tbd" time="{duration}" timestamp="tbd"> <testsuite name="CatchSelfTest" errors="13" failures="72" tests="921" hostname="tbd" time="{duration}" timestamp="tbd">
<testcase classname="global" name="toString(enum)" time="{duration}"/> <testcase classname="global" name="toString(enum)" time="{duration}"/>
<testcase classname="global" name="toString(enum w/operator&lt;&lt;)" time="{duration}"/> <testcase classname="global" name="toString(enum w/operator&lt;&lt;)" time="{duration}"/>
<testcase classname="global" name="toString(enum class)" time="{duration}"/> <testcase classname="global" name="toString(enum class)" time="{duration}"/>
@ -518,8 +518,11 @@ MiscTests.cpp:<line number>
<testcase classname="Process can be configured on command line" name="output filename/-o filename" time="{duration}"/> <testcase classname="Process can be configured on command line" name="output filename/-o filename" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="output filename/--out" time="{duration}"/> <testcase classname="Process can be configured on command line" name="output filename/--out" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="combinations/Single character flags can be combined" time="{duration}"/> <testcase classname="Process can be configured on command line" name="combinations/Single character flags can be combined" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="force-colour/--force-colour" time="{duration}"/> <testcase classname="Process can be configured on command line" name="use-colour/without option" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="force-colour/without --force-colour" time="{duration}"/> <testcase classname="Process can be configured on command line" name="use-colour/auto" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="use-colour/yes" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="use-colour/no" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="use-colour/error" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/No wrapping" time="{duration}"/> <testcase classname="Long strings can be wrapped" name="plain string/No wrapping" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/Wrapped once" time="{duration}"/> <testcase classname="Long strings can be wrapped" name="plain string/Wrapped once" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/Wrapped twice" time="{duration}"/> <testcase classname="Long strings can be wrapped" name="plain string/Wrapped twice" time="{duration}"/>

View File

@ -4567,8 +4567,8 @@
</Section> </Section>
<OverallResults successes="4" failures="0" expectedFailures="0"/> <OverallResults successes="4" failures="0" expectedFailures="0"/>
</Section> </Section>
<Section name="force-colour"> <Section name="use-colour">
<Section name="--force-colour"> <Section name="without option">
<Expression success="true" type="CHECK_NOTHROW" filename="projects/SelfTest/TestMain.cpp" > <Expression success="true" type="CHECK_NOTHROW" filename="projects/SelfTest/TestMain.cpp" >
<Original> <Original>
parseIntoConfig( argv, config ) parseIntoConfig( argv, config )
@ -4579,18 +4579,18 @@
</Expression> </Expression>
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" > <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
<Original> <Original>
config.forceColour config.useColour == UseColour::Auto
</Original> </Original>
<Expanded> <Expanded>
true 0 == 0
</Expanded> </Expanded>
</Expression> </Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/> <OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section> </Section>
<OverallResults successes="2" failures="0" expectedFailures="0"/> <OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section> </Section>
<Section name="force-colour"> <Section name="use-colour">
<Section name="without --force-colour"> <Section name="auto">
<Expression success="true" type="CHECK_NOTHROW" filename="projects/SelfTest/TestMain.cpp" > <Expression success="true" type="CHECK_NOTHROW" filename="projects/SelfTest/TestMain.cpp" >
<Original> <Original>
parseIntoConfig( argv, config ) parseIntoConfig( argv, config )
@ -4601,16 +4601,74 @@
</Expression> </Expression>
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" > <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
<Original> <Original>
!config.forceColour config.useColour == UseColour::Auto
</Original> </Original>
<Expanded> <Expanded>
true 0 == 0
</Expanded> </Expanded>
</Expression> </Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/> <OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section> </Section>
<OverallResults successes="2" failures="0" expectedFailures="0"/> <OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section> </Section>
<Section name="use-colour">
<Section name="yes">
<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.useColour == UseColour::Yes
</Original>
<Expanded>
1 == 1
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<Section name="use-colour">
<Section name="no">
<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.useColour == UseColour::No
</Original>
<Expanded>
2 == 2
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<Section name="use-colour">
<Section name="error">
<Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/SelfTest/TestMain.cpp" >
<Original>
parseIntoConfig( argv, config ), Contains( "colour mode must be one of" )
</Original>
<Expanded>
parseIntoConfig( argv, config ), Contains( "colour mode must be one of" )
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0"/>
</Section>
<OverallResult success="true"/> <OverallResult success="true"/>
</TestCase> </TestCase>
<TestCase name="Long strings can be wrapped"> <TestCase name="Long strings can be wrapped">
@ -9505,7 +9563,7 @@ there"
</Section> </Section>
<OverallResult success="true"/> <OverallResult success="true"/>
</TestCase> </TestCase>
<OverallResults successes="818" failures="85" expectedFailures="13"/> <OverallResults successes="823" failures="85" expectedFailures="13"/>
</Group> </Group>
<OverallResults successes="818" failures="85" expectedFailures="13"/> <OverallResults successes="823" failures="85" expectedFailures="13"/>
</Catch> </Catch>