Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Rebased following Clara changes

Commit
c41a45e79ced6e3aeb7bcc64d986dc58305706bd
Author
Phil Nash ·
Parents
1c223b63ba8c

Files · Download .tar.gz

Changes

 .../SelfTest/Baselines/console.std.approved.txt    |   2 +-
 .../SelfTest/Baselines/console.sw.approved.txt     | 142 ++++++++++-----
 projects/SelfTest/Baselines/junit.sw.approved.txt  |   3 +-
 projects/SelfTest/Baselines/xml.sw.approved.txt    | 198 ++++++++++-----------
 4 files changed, 194 insertions(+), 151 deletions(-)

diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt
index c7b1b566..49f184e9 100644
--- a/projects/SelfTest/Baselines/console.std.approved.txt
+++ b/projects/SelfTest/Baselines/console.std.approved.txt
@@ -1003,5 +1003,5 @@ with expansion:
 
 ===============================================================================
 test cases: 171 | 121 passed | 46 failed |  4 failed as expected
-assertions: 843 | 728 passed | 94 failed | 21 failed as expected
+assertions: 844 | 729 passed | 94 failed | 21 failed as expected
 
diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt
index f70bda98..e74a3348 100644
--- a/projects/SelfTest/Baselines/console.sw.approved.txt
+++ b/projects/SelfTest/Baselines/console.sw.approved.txt
@@ -4773,7 +4773,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parser.parseInto( std::vector<std::string>(), config ) )
+  CHECK( result )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -4790,7 +4792,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( result )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -4832,17 +4836,19 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( result )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE( cfg.testSpec().matches( fakeTestCase( "notIncluded" ) ) == false )
+  REQUIRE( cfg.testSpec().matches(fakeTestCase("notIncluded")) == false )
 with expansion:
   false == false
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE( cfg.testSpec().matches( fakeTestCase( "test1" ) ) )
+  REQUIRE( cfg.testSpec().matches(fakeTestCase("test1")) )
 with expansion:
   true
 
@@ -4856,17 +4862,19 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( result )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE( cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false )
+  REQUIRE( cfg.testSpec().matches(fakeTestCase("test1")) == false )
 with expansion:
   false == false
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE( cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) )
+  REQUIRE( cfg.testSpec().matches(fakeTestCase("alwaysIncluded")) )
 with expansion:
   true
 
@@ -4880,17 +4888,19 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( result )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE( cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false )
+  REQUIRE( cfg.testSpec().matches(fakeTestCase("test1")) == false )
 with expansion:
   false == false
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE( cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) )
+  REQUIRE( cfg.testSpec().matches(fakeTestCase("alwaysIncluded")) )
 with expansion:
   true
 
@@ -4904,7 +4914,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "-r", "console"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -4922,7 +4934,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "-r", "xml"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -4940,7 +4954,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "-r", "xml", "-r", "junit"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -4970,7 +4986,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "--reporter", "junit"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -4988,7 +5006,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "-b"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5006,7 +5026,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "--break"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5024,7 +5046,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "-a"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5042,7 +5066,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "-x", "2"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5053,32 +5079,23 @@ with expansion:
 -------------------------------------------------------------------------------
 Process can be configured on command line
   abort
-  -x must be greater than zero
+  -x must be numeric
 -------------------------------------------------------------------------------
 TestMain.cpp:<line number>
 ...............................................................................
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ), Contains( "greater than zero" ) )
+  CHECK( !result )
 with expansion:
-  "Value after -x or --abortAfter must be greater than zero
-  - while parsing: (-x, --abortx <no. failures>)" contains: "greater than zero"
-
--------------------------------------------------------------------------------
-Process can be configured on command line
-  abort
-  -x must be numeric
--------------------------------------------------------------------------------
-TestMain.cpp:<line number>
-...............................................................................
+  true
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ), Contains( "-x" ) )
+  REQUIRE_THAT( result.errorMessage(), Contains("convert") && Contains("oops") )
 with expansion:
-  "Unable to convert oops to destination type
-  - while parsing: (-x, --abortx <no. failures>)" contains: "-x"
+  "Unable to convert 'oops' to destination type" ( contains: "convert" and
+  contains: "oops" )
 
 -------------------------------------------------------------------------------
 Process can be configured on command line
@@ -5090,13 +5107,15 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "-e"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE( config.noThrow == true )
+  REQUIRE( config.noThrow )
 with expansion:
-  true == true
+  true
 
 -------------------------------------------------------------------------------
 Process can be configured on command line
@@ -5108,13 +5127,15 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "--nothrow"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE( config.noThrow == true )
+  REQUIRE( config.noThrow )
 with expansion:
-  true == true
+  true
 
 -------------------------------------------------------------------------------
 Process can be configured on command line
@@ -5126,7 +5147,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "-o", "filename.ext"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5144,7 +5167,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "--out", "filename.ext"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5162,7 +5187,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "-abe"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5192,7 +5219,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5210,7 +5239,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "--use-colour", "auto"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5228,7 +5259,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "--use-colour", "yes"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5246,7 +5279,9 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+  CHECK( cli.parse({"test", "--use-colour", "no"}) )
+with expansion:
+  {?}
 
 TestMain.cpp:<line number>:
 PASSED:
@@ -5264,7 +5299,16 @@ TestMain.cpp:<line number>
 
 TestMain.cpp:<line number>:
 PASSED:
-  REQUIRE_THROWS_WITH( parseIntoConfig( argv, config ), Contains( "colour mode must be one of" ) )
+  CHECK( !result )
+with expansion:
+  true
+
+TestMain.cpp:<line number>:
+PASSED:
+  CHECK_THAT( result.errorMessage(), Contains( "colour mode must be one of" ) )
+with expansion:
+  "colour mode must be one of: auto, yes or no. 'wrong' not recognised"
+  contains: "colour mode must be one of"
 
 -------------------------------------------------------------------------------
 Reconstruction should be based on stringification: #914
@@ -8309,5 +8353,5 @@ PASSED:
 
 ===============================================================================
 test cases: 171 | 120 passed | 47 failed |  4 failed as expected
-assertions: 845 | 728 passed | 96 failed | 21 failed as expected
+assertions: 846 | 729 passed | 96 failed | 21 failed as expected
 
diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt
index 8f2cd749..cae1e4bf 100644
--- a/projects/SelfTest/Baselines/junit.sw.approved.txt
+++ b/projects/SelfTest/Baselines/junit.sw.approved.txt
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <testsuitesspanner>
-  <testsuite name="<exe-name>" errors="15" failures="82" tests="846" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
+  <testsuite name="<exe-name>" errors="15" failures="82" tests="847" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
     <testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}">
       <error type="TEST_CASE">
@@ -458,7 +458,6 @@ MessageTests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/debugger/--break" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-a aborts after first failure" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-x 2 aborts after two failures" time="{duration}"/>
-    <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-x must be greater than zero" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-x must be numeric" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/nothrow/-e" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/nothrow/--nothrow" time="{duration}"/>
diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt
index 130cda8a..948cff19 100644
--- a/projects/SelfTest/Baselines/xml.sw.approved.txt
+++ b/projects/SelfTest/Baselines/xml.sw.approved.txt
@@ -5325,12 +5325,12 @@ re>"
     </TestCase>
     <TestCase name="Process can be configured on command line" tags="[command-line][config]" filename="projects/<exe-name>/TestMain.cpp" >
       <Section name="empty args don't cause a crash" filename="projects/<exe-name>/TestMain.cpp" >
-        <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
           <Original>
-            parser.parseInto( std::vector&lt;std::string>(), config )
+            result
           </Original>
           <Expanded>
-            parser.parseInto( std::vector&lt;std::string>(), config )
+            {?}
           </Expanded>
         </Expression>
         <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5344,12 +5344,12 @@ re>"
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
       <Section name="default - no arguments" filename="projects/<exe-name>/TestMain.cpp" >
-        <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
           <Original>
-            parseIntoConfig( argv, config )
+            result
           </Original>
           <Expanded>
-            parseIntoConfig( argv, config )
+            {?}
           </Expanded>
         </Expression>
         <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5396,17 +5396,17 @@ re>"
       </Section>
       <Section name="test lists" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="1 test" description="Specify one test case using" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              result
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              cfg.testSpec().matches( fakeTestCase( "notIncluded" ) ) == false
+              cfg.testSpec().matches(fakeTestCase("notIncluded")) == false
             </Original>
             <Expanded>
               false == false
@@ -5414,7 +5414,7 @@ re>"
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              cfg.testSpec().matches( fakeTestCase( "test1" ) )
+              cfg.testSpec().matches(fakeTestCase("test1"))
             </Original>
             <Expanded>
               true
@@ -5426,17 +5426,17 @@ re>"
       </Section>
       <Section name="test lists" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="Specify one test case exclusion using exclude:" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              result
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false
+              cfg.testSpec().matches(fakeTestCase("test1")) == false
             </Original>
             <Expanded>
               false == false
@@ -5444,7 +5444,7 @@ re>"
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) )
+              cfg.testSpec().matches(fakeTestCase("alwaysIncluded"))
             </Original>
             <Expanded>
               true
@@ -5456,17 +5456,17 @@ re>"
       </Section>
       <Section name="test lists" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="Specify one test case exclusion using ~" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              result
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false
+              cfg.testSpec().matches(fakeTestCase("test1")) == false
             </Original>
             <Expanded>
               false == false
@@ -5474,7 +5474,7 @@ re>"
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) )
+              cfg.testSpec().matches(fakeTestCase("alwaysIncluded"))
             </Original>
             <Expanded>
               true
@@ -5486,12 +5486,12 @@ re>"
       </Section>
       <Section name="reporter" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="-r/console" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "-r", "console"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5508,12 +5508,12 @@ re>"
       </Section>
       <Section name="reporter" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="-r/xml" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "-r", "xml"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5530,12 +5530,12 @@ re>"
       </Section>
       <Section name="reporter" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="-r xml and junit" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "-r", "xml", "-r", "junit"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5568,12 +5568,12 @@ re>"
       </Section>
       <Section name="reporter" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="--reporter/junit" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "--reporter", "junit"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5590,12 +5590,12 @@ re>"
       </Section>
       <Section name="debugger" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="-b" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "-b"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5612,12 +5612,12 @@ re>"
       </Section>
       <Section name="debugger" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="--break" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "--break"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5634,12 +5634,12 @@ re>"
       </Section>
       <Section name="abort" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="-a aborts after first failure" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "-a"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5656,12 +5656,12 @@ re>"
       </Section>
       <Section name="abort" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="-x 2 aborts after two failures" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "-x", "2"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5677,51 +5677,43 @@ re>"
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
       <Section name="abort" filename="projects/<exe-name>/TestMain.cpp" >
-        <Section name="-x must be greater than zero" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/TestMain.cpp" >
+        <Section name="-x must be numeric" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfigAndReturnError( argv, config ), Contains( "greater than zero" )
+              !result
             </Original>
             <Expanded>
-              "Value after -x or --abortAfter must be greater than zero
-- while parsing: (-x, --abortx &lt;no. failures>)" contains: "greater than zero"
+              true
             </Expanded>
           </Expression>
-          <OverallResults successes="1" failures="0" expectedFailures="0"/>
-        </Section>
-        <OverallResults successes="1" failures="0" expectedFailures="0"/>
-      </Section>
-      <Section name="abort" filename="projects/<exe-name>/TestMain.cpp" >
-        <Section name="-x must be numeric" filename="projects/<exe-name>/TestMain.cpp" >
           <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfigAndReturnError( argv, config ), Contains( "-x" )
+              result.errorMessage(), Contains("convert") &amp;&amp; Contains("oops")
             </Original>
             <Expanded>
-              "Unable to convert oops to destination type
-- while parsing: (-x, --abortx &lt;no. failures>)" contains: "-x"
+              "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" )
             </Expanded>
           </Expression>
-          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+          <OverallResults successes="2" failures="0" expectedFailures="0"/>
         </Section>
-        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
       <Section name="nothrow" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="-e" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "-e"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              config.noThrow == true
+              config.noThrow
             </Original>
             <Expanded>
-              true == true
+              true
             </Expanded>
           </Expression>
           <OverallResults successes="2" failures="0" expectedFailures="0"/>
@@ -5730,20 +5722,20 @@ re>"
       </Section>
       <Section name="nothrow" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="--nothrow" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "--nothrow"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              config.noThrow == true
+              config.noThrow
             </Original>
             <Expanded>
-              true == true
+              true
             </Expanded>
           </Expression>
           <OverallResults successes="2" failures="0" expectedFailures="0"/>
@@ -5752,12 +5744,12 @@ re>"
       </Section>
       <Section name="output filename" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="-o filename" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "-o", "filename.ext"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5774,12 +5766,12 @@ re>"
       </Section>
       <Section name="output filename" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="--out" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "--out", "filename.ext"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5796,12 +5788,12 @@ re>"
       </Section>
       <Section name="combinations" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="Single character flags can be combined" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "-abe"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5834,12 +5826,12 @@ re>"
       </Section>
       <Section name="use-colour" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="without option" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5856,12 +5848,12 @@ re>"
       </Section>
       <Section name="use-colour" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="auto" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "--use-colour", "auto"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5878,12 +5870,12 @@ re>"
       </Section>
       <Section name="use-colour" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="yes" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "--use-colour", "yes"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5900,12 +5892,12 @@ re>"
       </Section>
       <Section name="use-colour" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="no" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="CHECK_NOTHROW" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config )
+              cli.parse({"test", "--use-colour", "no"})
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config )
+              {?}
             </Expanded>
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TestMain.cpp" >
@@ -5922,17 +5914,25 @@ re>"
       </Section>
       <Section name="use-colour" filename="projects/<exe-name>/TestMain.cpp" >
         <Section name="error" filename="projects/<exe-name>/TestMain.cpp" >
-          <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/TestMain.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/TestMain.cpp" >
             <Original>
-              parseIntoConfig( argv, config ), Contains( "colour mode must be one of" )
+              !result
             </Original>
             <Expanded>
-              parseIntoConfig( argv, config ), Contains( "colour mode must be one of" )
+              true
             </Expanded>
           </Expression>
-          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+          <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/TestMain.cpp" >
+            <Original>
+              result.errorMessage(), Contains( "colour mode must be one of" )
+            </Original>
+            <Expanded>
+              "colour mode must be one of: auto, yes or no. 'wrong' not recognised" contains: "colour mode must be one of"
+            </Expanded>
+          </Expression>
+          <OverallResults successes="2" failures="0" expectedFailures="0"/>
         </Section>
-        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
       <OverallResult success="true"/>
     </TestCase>
@@ -9166,7 +9166,7 @@ spanner      <OverallResult success="true"/>
       </Section>
       <OverallResult success="true"/>
     </TestCase>
-    <OverallResults successes="728" failures="97" expectedFailures="21"/>
+    <OverallResults successes="729" failures="97" expectedFailures="21"/>
   </Group>
-  <OverallResults successes="728" failures="96" expectedFailures="21"/>
+  <OverallResults successes="729" failures="96" expectedFailures="21"/>
 </Catch>