diff options
| author | Phil Nash | 2013-03-29 11:42:10 +0000 |
|---|---|---|
| committer | Phil Nash | 2013-03-29 11:42:10 +0000 |
| commit | e324d2829d632febf346d1df698da5557c99cf6c (patch) | |
| tree | 636ca2900c8aa1d82d53c06676b4921ee4c68e7f /projects | |
| parent | d0df295c25e1967b9bf94cf234a47a80c47b0369 (diff) | |
| download | catch3-e324d2829d632febf346d1df698da5557c99cf6c.tar.gz | |
Added -l tags
- which lists available tags.
- also improved formatting of -l for tests
Diffstat (limited to 'projects')
| -rw-r--r-- | projects/SelfTest/Baselines/approvedResults.txt | 756 | ||||
| -rw-r--r-- | projects/XCode4/CatchSelfTest/CatchSelfTest/BDDTests.cpp | 5 |
2 files changed, 632 insertions, 129 deletions
diff --git a/projects/SelfTest/Baselines/approvedResults.txt b/projects/SelfTest/Baselines/approvedResults.txt index 43fd126a..cc251b7e 100644 --- a/projects/SelfTest/Baselines/approvedResults.txt +++ b/projects/SelfTest/Baselines/approvedResults.txt @@ -3673,8 +3673,8 @@ TestMain.cpp:226: PASSED: REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ) Contains( "greater than zero" ) ) with expansion: - "Error while parsing arguments. threshold must be a number greater than - zero. Arguments were: 0" contains: "greater than zero" + "Error while parsing arguments. threshold must be a number greater than zero + . Arguments were: 0" contains: "greater than zero" ------------------------------------------------------------------------------- selftest/parser/2 @@ -3686,8 +3686,8 @@ TestMain.cpp:230: PASSED: REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ) Contains( "greater than zero" ) ) with expansion: - "Error while parsing arguments. threshold must be a number greater than - zero. Arguments were: oops" contains: "greater than zero" + "Error while parsing arguments. threshold must be a number greater than zero + . Arguments were: oops" contains: "greater than zero" ------------------------------------------------------------------------------- selftest/parser/2 @@ -4173,7 +4173,7 @@ Long strings can be wrapped TestMain.cpp:435: PASSED: - CHECK( Catch::LineWrapper( 80 ).wrap( testString ).toString() == testString ) + CHECK( Catch::LineWrapper().setRight( 80 ).wrap( testString ).toString() == testString ) with expansion: "one two three four" == @@ -4181,7 +4181,7 @@ with expansion: TestMain.cpp:436: PASSED: - CHECK( Catch::LineWrapper( 18 ).wrap( testString ).toString() == testString ) + CHECK( Catch::LineWrapper().setRight( 18 ).wrap( testString ).toString() == testString ) with expansion: "one two three four" == @@ -4195,7 +4195,7 @@ Long strings can be wrapped TestMain.cpp:439: PASSED: - CHECK( Catch::LineWrapper( 17 ).wrap( testString ).toString() == "one two three\nfour" ) + CHECK( Catch::LineWrapper().setRight( 17 ).wrap( testString ).toString() == "one two three\nfour" ) with expansion: "one two three four" @@ -4205,7 +4205,7 @@ with expansion: TestMain.cpp:440: PASSED: - CHECK( Catch::LineWrapper( 16 ).wrap( testString ).toString() == "one two three\nfour" ) + CHECK( Catch::LineWrapper().setRight( 16 ).wrap( testString ).toString() == "one two three\nfour" ) with expansion: "one two three four" @@ -4215,7 +4215,7 @@ with expansion: TestMain.cpp:441: PASSED: - CHECK( Catch::LineWrapper( 15 ).wrap( testString ).toString() == "one two three\nfour" ) + CHECK( Catch::LineWrapper().setRight( 15 ).wrap( testString ).toString() == "one two three\nfour" ) with expansion: "one two three four" @@ -4225,7 +4225,7 @@ with expansion: TestMain.cpp:442: PASSED: - CHECK( Catch::LineWrapper( 14 ).wrap( testString ).toString() == "one two three\nfour" ) + CHECK( Catch::LineWrapper().setRight( 14 ).wrap( testString ).toString() == "one two three\nfour" ) with expansion: "one two three four" @@ -4235,7 +4235,7 @@ with expansion: TestMain.cpp:443: PASSED: - CHECK( Catch::LineWrapper( 13 ).wrap( testString ).toString() == "one two\nthree four" ) + CHECK( Catch::LineWrapper().setRight( 13 ).wrap( testString ).toString() == "one two\nthree four" ) with expansion: "one two three four" @@ -4251,7 +4251,7 @@ Long strings can be wrapped TestMain.cpp:446: PASSED: - CHECK( Catch::LineWrapper( 9 ).wrap( testString ).toString() == "one two\nthree\nfour" ) + CHECK( Catch::LineWrapper().setRight( 9 ).wrap( testString ).toString() == "one two\nthree\nfour" ) with expansion: "one two three @@ -4263,7 +4263,7 @@ with expansion: TestMain.cpp:447: PASSED: - CHECK( Catch::LineWrapper( 8 ).wrap( testString ).toString() == "one two\nthree\nfour" ) + CHECK( Catch::LineWrapper().setRight( 8 ).wrap( testString ).toString() == "one two\nthree\nfour" ) with expansion: "one two three @@ -4281,7 +4281,7 @@ Long strings can be wrapped TestMain.cpp:450: PASSED: - CHECK( Catch::LineWrapper( 7 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" ) + CHECK( Catch::LineWrapper().setRight( 7 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" ) with expansion: "one two @@ -4295,7 +4295,7 @@ with expansion: TestMain.cpp:451: PASSED: - CHECK( Catch::LineWrapper( 5 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" ) + CHECK( Catch::LineWrapper().setRight( 5 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" ) with expansion: "one two @@ -4315,7 +4315,7 @@ Long strings can be wrapped TestMain.cpp:454: PASSED: - CHECK( Catch::LineWrapper( 4 ).wrap( "abcdef" ).toString() == "abc-\ndef" ) + CHECK( Catch::LineWrapper().setRight( 4 ).wrap( "abcdef" ).toString() == "abc-\ndef" ) with expansion: "abc- def" @@ -4325,7 +4325,7 @@ with expansion: TestMain.cpp:455: PASSED: - CHECK( Catch::LineWrapper( 4 ).wrap( "abcdefg" ).toString() == "abc-\ndefg" ) + CHECK( Catch::LineWrapper().setRight( 4 ).wrap( "abcdefg" ).toString() == "abc-\ndefg" ) with expansion: "abc- defg" @@ -4335,7 +4335,7 @@ with expansion: TestMain.cpp:456: PASSED: - CHECK( Catch::LineWrapper( 4 ).wrap("abcdefgh" ).toString() == "abc-\ndef-\ngh" ) + CHECK( Catch::LineWrapper().setRight( 4 ).wrap("abcdefgh" ).toString() == "abc-\ndef-\ngh" ) with expansion: "abc- def- @@ -4347,7 +4347,7 @@ with expansion: TestMain.cpp:458: PASSED: - CHECK( Catch::LineWrapper( 4 ).wrap( testString ).toString() == "one\ntwo\nthr-\nee\nfour" ) + CHECK( Catch::LineWrapper().setRight( 4 ).wrap( testString ).toString() == "one\ntwo\nthr-\nee\nfour" ) with expansion: "one two @@ -4363,7 +4363,7 @@ with expansion: TestMain.cpp:459: PASSED: - CHECK( Catch::LineWrapper( 3 ).wrap( testString ).toString() == "one\ntwo\nth-\nree\nfo-\nur" ) + CHECK( Catch::LineWrapper().setRight( 3 ).wrap( testString ).toString() == "one\ntwo\nth-\nree\nfo-\nur" ) with expansion: "one two @@ -4381,13 +4381,49 @@ with expansion: ------------------------------------------------------------------------------- Long strings can be wrapped + plain string + As container +............................................................................... + +TestMain.cpp:464: +PASSED: + CHECK( wrapper.size() == 4 ) +with expansion: + 4 == 4 + +TestMain.cpp:465: +PASSED: + CHECK( wrapper[0] == "one" ) +with expansion: + "one" == "one" + +TestMain.cpp:466: +PASSED: + CHECK( wrapper[1] == "two" ) +with expansion: + "two" == "two" + +TestMain.cpp:467: +PASSED: + CHECK( wrapper[2] == "three" ) +with expansion: + "three" == "three" + +TestMain.cpp:468: +PASSED: + CHECK( wrapper[3] == "four" ) +with expansion: + "four" == "four" + +------------------------------------------------------------------------------- +Long strings can be wrapped With newlines No wrapping ............................................................................... -TestMain.cpp:469: +TestMain.cpp:478: PASSED: - CHECK( Catch::LineWrapper( 80 ).wrap( testString ).toString() == testString ) + CHECK( Catch::LineWrapper().setRight( 80 ).wrap( testString ).toString() == testString ) with expansion: "one two three four" @@ -4395,9 +4431,9 @@ with expansion: "one two three four" -TestMain.cpp:470: +TestMain.cpp:479: PASSED: - CHECK( Catch::LineWrapper( 18 ).wrap( testString ).toString() == testString ) + CHECK( Catch::LineWrapper().setRight( 18 ).wrap( testString ).toString() == testString ) with expansion: "one two three four" @@ -4405,9 +4441,9 @@ with expansion: "one two three four" -TestMain.cpp:471: +TestMain.cpp:480: PASSED: - CHECK( Catch::LineWrapper( 10 ).wrap( testString ).toString() == testString ) + CHECK( Catch::LineWrapper().setRight( 10 ).wrap( testString ).toString() == testString ) with expansion: "one two three four" @@ -4421,9 +4457,9 @@ Long strings can be wrapped Trailing newline ............................................................................... -TestMain.cpp:474: +TestMain.cpp:483: PASSED: - CHECK( Catch::LineWrapper( 10 ).wrap( "abcdef\n" ).toString() == "abcdef\n" ) + CHECK( Catch::LineWrapper().setRight( 10 ).wrap( "abcdef\n" ).toString() == "abcdef\n" ) with expansion: "abcdef " @@ -4431,15 +4467,15 @@ with expansion: "abcdef " -TestMain.cpp:475: +TestMain.cpp:484: PASSED: - CHECK( Catch::LineWrapper( 6 ).wrap( "abcdef" ).toString() == "abcdef" ) + CHECK( Catch::LineWrapper().setRight( 6 ).wrap( "abcdef" ).toString() == "abcdef" ) with expansion: "abcdef" == "abcdef" -TestMain.cpp:476: +TestMain.cpp:485: PASSED: - CHECK( Catch::LineWrapper( 6 ).wrap( "abcdef\n" ).toString() == "abcdef\n" ) + CHECK( Catch::LineWrapper().setRight( 6 ).wrap( "abcdef\n" ).toString() == "abcdef\n" ) with expansion: "abcdef " @@ -4453,9 +4489,9 @@ Long strings can be wrapped Wrapped once ............................................................................... -TestMain.cpp:479: +TestMain.cpp:488: PASSED: - CHECK( Catch::LineWrapper( 9 ).wrap( testString ).toString() == "one two\nthree\nfour" ) + CHECK( Catch::LineWrapper().setRight( 9 ).wrap( testString ).toString() == "one two\nthree\nfour" ) with expansion: "one two three @@ -4465,9 +4501,9 @@ with expansion: three four" -TestMain.cpp:480: +TestMain.cpp:489: PASSED: - CHECK( Catch::LineWrapper( 8 ).wrap( testString ).toString() == "one two\nthree\nfour" ) + CHECK( Catch::LineWrapper().setRight( 8 ).wrap( testString ).toString() == "one two\nthree\nfour" ) with expansion: "one two three @@ -4477,9 +4513,9 @@ with expansion: three four" -TestMain.cpp:481: +TestMain.cpp:490: PASSED: - CHECK( Catch::LineWrapper( 7 ).wrap( testString ).toString() == "one two\nthree\nfour" ) + CHECK( Catch::LineWrapper().setRight( 7 ).wrap( testString ).toString() == "one two\nthree\nfour" ) with expansion: "one two three @@ -4495,9 +4531,9 @@ Long strings can be wrapped Wrapped twice ............................................................................... -TestMain.cpp:484: +TestMain.cpp:493: PASSED: - CHECK( Catch::LineWrapper( 6 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" ) + CHECK( Catch::LineWrapper().setRight( 6 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" ) with expansion: "one two @@ -4785,9 +4821,9 @@ with expansion: ------------------------------------------------------------------------------- Scenario: Do that thing with the thing - Given: This stuff exists - When: I do this - Then: it should do this + Given: This stuff exists + When: I do this + Then: it should do this ............................................................................... BDDTests.cpp:21: @@ -4798,10 +4834,10 @@ with expansion: ------------------------------------------------------------------------------- Scenario: Do that thing with the thing - Given: This stuff exists - When: I do this - Then: it should do this - And: do that + Given: This stuff exists + When: I do this + Then: it should do this + And: do that ............................................................................... BDDTests.cpp:23: @@ -4811,6 +4847,165 @@ with expansion: true ------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector +............................................................................... + +BDDTests.cpp:32: +PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: it is made larger + Then: the size and capacity go up +............................................................................... + +BDDTests.cpp:37: +PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +BDDTests.cpp:38: +PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: it is made larger + Then: the size and capacity go up + And when: it is made smaller again + Then: the size goes down but the capacity stays the same +............................................................................... + +BDDTests.cpp:43: +PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +BDDTests.cpp:44: +PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector +............................................................................... + +BDDTests.cpp:32: +PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: it is made larger + Then: the size and capacity go up +............................................................................... + +BDDTests.cpp:37: +PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +BDDTests.cpp:38: +PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector +............................................................................... + +BDDTests.cpp:32: +PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: it is made larger + Then: the size and capacity go up +............................................................................... + +BDDTests.cpp:37: +PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +BDDTests.cpp:38: +PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector +............................................................................... + +BDDTests.cpp:32: +PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector +............................................................................... + +BDDTests.cpp:32: +PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: we reserve more space + Then: The capacity is increased but the size remains the same +............................................................................... + +BDDTests.cpp:53: +PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +BDDTests.cpp:54: +PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: This is a really long scenario name to see how the list command deals with wrapping +............................................................................... + + +No assertions in test case, 'Scenario: This is a really long scenario name to see how the list command deals with wrapping' + +------------------------------------------------------------------------------- Anonymous test case 1 ............................................................................... @@ -4839,7 +5034,7 @@ with message: no assertions =============================================================================== -106 test cases - 47 failed (676 assertions - 104 failed) +108 test cases - 48 failed (697 assertions - 105 failed) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -5134,7 +5329,7 @@ with expansion: 13 test cases - 3 failed (40 assertions - 4 failed) <testsuites> - <testsuite name="~dummy" errors="9" failures="77" tests="676" hostname="tbd" time="tbd" timestamp="tbd"> + <testsuite name="~dummy" errors="9" failures="77" tests="697" hostname="tbd" time="tbd" timestamp="tbd"> <testcase classname="global" name="./succeeding/Approx/simple" time="tbd"/> <testcase classname="global" name="./succeeding/Approx/epsilon" time="tbd"/> <testcase classname="global" name="./succeeding/Approx/float" time="tbd"/> @@ -5574,6 +5769,8 @@ TrickyTests.cpp:106 <testcase classname="global" name="./succeeding/SafeBool" time="tbd"/> <testcase classname="global" name="Assertions then sections" time="tbd"/> <testcase classname="global" name="Scenario: Do that thing with the thing" time="tbd"/> + <testcase classname="global" name="Scenario: Vector resizing affects size and capacity" time="tbd"/> + <testcase classname="global" name="Scenario: This is a really long scenario name to see how the list command deals with wrapping" time="tbd"/> <testcase classname="global" name="Anonymous test case 1" time="tbd"/> <testcase classname="global" name="Test case with one argument" time="tbd"/> <testcase classname="global" name="Variadic macros" time="tbd"/> @@ -10377,7 +10574,7 @@ TestMain.cpp" line="423"> <Section name="No wrapping"> TestMain.cpp" line="435"> <Original> - Catch::LineWrapper( 80 ).wrap( testString ).toString() == testString + Catch::LineWrapper().setRight( 80 ).wrap( testString ).toString() == testString </Original> <Expanded> "one two three four" @@ -10387,7 +10584,7 @@ TestMain.cpp" line="435"> </Expression> TestMain.cpp" line="436"> <Original> - Catch::LineWrapper( 18 ).wrap( testString ).toString() == testString + Catch::LineWrapper().setRight( 18 ).wrap( testString ).toString() == testString </Original> <Expanded> "one two three four" @@ -10403,7 +10600,7 @@ TestMain.cpp" line="436"> <Section name="Wrapped once"> TestMain.cpp" line="439"> <Original> - Catch::LineWrapper( 17 ).wrap( testString ).toString() == "one two three\nfour" + Catch::LineWrapper().setRight( 17 ).wrap( testString ).toString() == "one two three\nfour" </Original> <Expanded> "one two three @@ -10415,7 +10612,7 @@ four" </Expression> TestMain.cpp" line="440"> <Original> - Catch::LineWrapper( 16 ).wrap( testString ).toString() == "one two three\nfour" + Catch::LineWrapper().setRight( 16 ).wrap( testString ).toString() == "one two three\nfour" </Original> <Expanded> "one two three @@ -10427,7 +10624,7 @@ four" </Expression> TestMain.cpp" line="441"> <Original> - Catch::LineWrapper( 15 ).wrap( testString ).toString() == "one two three\nfour" + Catch::LineWrapper().setRight( 15 ).wrap( testString ).toString() == "one two three\nfour" </Original> <Expanded> "one two three @@ -10439,7 +10636,7 @@ four" </Expression> TestMain.cpp" line="442"> <Original> - Catch::LineWrapper( 14 ).wrap( testString ).toString() == "one two three\nfour" + Catch::LineWrapper().setRight( 14 ).wrap( testString ).toString() == "one two three\nfour" </Original> <Expanded> "one two three @@ -10451,7 +10648,7 @@ four" </Expression> TestMain.cpp" line="443"> <Original> - Catch::LineWrapper( 13 ).wrap( testString ).toString() == "one two\nthree four" + Catch::LineWrapper().setRight( 13 ).wrap( testString ).toString() == "one two\nthree four" </Original> <Expanded> "one two @@ -10469,7 +10666,7 @@ three four" <Section name="Wrapped twice"> TestMain.cpp" line="446"> <Original> - Catch::LineWrapper( 9 ).wrap( testString ).toString() == "one two\nthree\nfour" + Catch::LineWrapper().setRight( 9 ).wrap( testString ).toString() == "one two\nthree\nfour" </Original> <Expanded> "one two @@ -10483,7 +10680,7 @@ four" </Expression> TestMain.cpp" line="447"> <Original> - Catch::LineWrapper( 8 ).wrap( testString ).toString() == "one two\nthree\nfour" + Catch::LineWrapper().setRight( 8 ).wrap( testString ).toString() == "one two\nthree\nfour" </Original> <Expanded> "one two @@ -10503,7 +10700,7 @@ four" <Section name="Wrapped three times"> TestMain.cpp" line="450"> <Original> - Catch::LineWrapper( 7 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" + Catch::LineWrapper().setRight( 7 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" </Original> <Expanded> "one @@ -10519,7 +10716,7 @@ four" </Expression> TestMain.cpp" line="451"> <Original> - Catch::LineWrapper( 5 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" + Catch::LineWrapper().setRight( 5 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" </Original> <Expanded> "one @@ -10541,7 +10738,7 @@ four" <Section name="Short wrap"> TestMain.cpp" line="454"> <Original> - Catch::LineWrapper( 4 ).wrap( "abcdef" ).toString() == "abc-\ndef" + Catch::LineWrapper().setRight( 4 ).wrap( "abcdef" ).toString() == "abc-\ndef" </Original> <Expanded> "abc- @@ -10553,7 +10750,7 @@ def" </Expression> TestMain.cpp" line="455"> <Original> - Catch::LineWrapper( 4 ).wrap( "abcdefg" ).toString() == "abc-\ndefg" + Catch::LineWrapper().setRight( 4 ).wrap( "abcdefg" ).toString() == "abc-\ndefg" </Original> <Expanded> "abc- @@ -10565,7 +10762,7 @@ defg" </Expression> TestMain.cpp" line="456"> <Original> - Catch::LineWrapper( 4 ).wrap("abcdefgh" ).toString() == "abc-\ndef-\ngh" + Catch::LineWrapper().setRight( 4 ).wrap("abcdefgh" ).toString() == "abc-\ndef-\ngh" </Original> <Expanded> "abc- @@ -10579,7 +10776,7 @@ gh" </Expression> TestMain.cpp" line="458"> <Original> - Catch::LineWrapper( 4 ).wrap( testString ).toString() == "one\ntwo\nthr-\nee\nfour" + Catch::LineWrapper().setRight( 4 ).wrap( testString ).toString() == "one\ntwo\nthr-\nee\nfour" </Original> <Expanded> "one @@ -10597,7 +10794,7 @@ four" </Expression> TestMain.cpp" line="459"> <Original> - Catch::LineWrapper( 3 ).wrap( testString ).toString() == "one\ntwo\nth-\nree\nfo-\nur" + Catch::LineWrapper().setRight( 3 ).wrap( testString ).toString() == "one\ntwo\nth-\nree\nfo-\nur" </Original> <Expanded> "one @@ -10620,13 +10817,59 @@ ur" <OverallResults successes="5" failures="0"/> </Section> <Section name="plain string"> + <Section name="As container"> +TestMain.cpp" line="464"> + <Original> + wrapper.size() == 4 + </Original> + <Expanded> + 4 == 4 + </Expanded> + </Expression> +TestMain.cpp" line="465"> + <Original> + wrapper[0] == "one" + </Original> + <Expanded> + "one" == "one" + </Expanded> + </Expression> +TestMain.cpp" line="466"> + <Original> + wrapper[1] == "two" + </Original> + <Expanded> + "two" == "two" + </Expanded> + </Expression> +TestMain.cpp" line="467"> + <Original> + wrapper[2] == "three" + </Original> + <Expanded> + "three" == "three" + </Expanded> + </Expression> +TestMain.cpp" line="468"> + <Original> + wrapper[3] == "four" + </Original> + <Expanded> + "four" == "four" + </Expanded> + </Expression> + <OverallResults successes="5" failures="0"/> + </Section> + <OverallResults successes="5" failures="0"/> + </Section> + <Section name="plain string"> <OverallResults successes="0" failures="0"/> </Section> <Section name="With newlines"> <Section name="No wrapping"> -TestMain.cpp" line="469"> +TestMain.cpp" line="478"> <Original> - Catch::LineWrapper( 80 ).wrap( testString ).toString() == testString + Catch::LineWrapper().setRight( 80 ).wrap( testString ).toString() == testString </Original> <Expanded> "one two @@ -10636,9 +10879,9 @@ three four" three four" </Expanded> </Expression> -TestMain.cpp" line="470"> +TestMain.cpp" line="479"> <Original> - Catch::LineWrapper( 18 ).wrap( testString ).toString() == testString + Catch::LineWrapper().setRight( 18 ).wrap( testString ).toString() == testString </Original> <Expanded> "one two @@ -10648,9 +10891,9 @@ three four" three four" </Expanded> </Expression> -TestMain.cpp" line="471"> +TestMain.cpp" line="480"> <Original> - Catch::LineWrapper( 10 ).wrap( testString ).toString() == testString + Catch::LineWrapper().setRight( 10 ).wrap( testString ).toString() == testString </Original> <Expanded> "one two @@ -10666,9 +10909,9 @@ three four" </Section> <Section name="With newlines"> <Section name="Trailing newline"> -TestMain.cpp" line="474"> +TestMain.cpp" line="483"> <Original> - Catch::LineWrapper( 10 ).wrap( "abcdef\n" ).toString() == "abcdef\n" + Catch::LineWrapper().setRight( 10 ).wrap( "abcdef\n" ).toString() == "abcdef\n" </Original> <Expanded> "abcdef @@ -10678,17 +10921,17 @@ TestMain.cpp" line="474"> " </Expanded> </Expression> -TestMain.cpp" line="475"> +TestMain.cpp" line="484"> <Original> - Catch::LineWrapper( 6 ).wrap( "abcdef" ).toString() == "abcdef" + Catch::LineWrapper().setRight( 6 ).wrap( "abcdef" ).toString() == "abcdef" </Original> <Expanded> "abcdef" == "abcdef" </Expanded> </Expression> -TestMain.cpp" line="476"> +TestMain.cpp" line="485"> <Original> - Catch::LineWrapper( 6 ).wrap( "abcdef\n" ).toString() == "abcdef\n" + Catch::LineWrapper().setRight( 6 ).wrap( "abcdef\n" ).toString() == "abcdef\n" </Original> <Expanded> "abcdef @@ -10704,9 +10947,9 @@ TestMain.cpp" line="476"> </Section> <Section name="With newlines"> <Section name="Wrapped once"> -TestMain.cpp" line="479"> +TestMain.cpp" line="488"> <Original> - Catch::LineWrapper( 9 ).wrap( testString ).toString() == "one two\nthree\nfour" + Catch::LineWrapper().setRight( 9 ).wrap( testString ).toString() == "one two\nthree\nfour" </Original> <Expanded> "one two @@ -10718,9 +10961,9 @@ three four" </Expanded> </Expression> -TestMain.cpp" line="480"> +TestMain.cpp" line="489"> <Original> - Catch::LineWrapper( 8 ).wrap( testString ).toString() == "one two\nthree\nfour" + Catch::LineWrapper().setRight( 8 ).wrap( testString ).toString() == "one two\nthree\nfour" </Original> <Expanded> "one two @@ -10732,9 +10975,9 @@ three four" </Expanded> </Expression> -TestMain.cpp" line="481"> +TestMain.cpp" line="490"> <Original> - Catch::LineWrapper( 7 ).wrap( testString ).toString() == "one two\nthree\nfour" + Catch::LineWrapper().setRight( 7 ).wrap( testString ).toString() == "one two\nthree\nfour" </Original> <Expanded> "one two @@ -10752,9 +10995,9 @@ four" </Section> <Section name="With newlines"> <Section name="Wrapped twice"> -TestMain.cpp" line="484"> +TestMain.cpp" line="493"> <Original> - Catch::LineWrapper( 6 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" + Catch::LineWrapper().setRight( 6 ).wrap( testString ).toString() == "one\ntwo\nthree\nfour" </Original> <Expanded> "one @@ -11063,9 +11306,9 @@ TrickyTests.cpp" line="335"> <OverallResult success="true"/> </TestCase> <TestCase name="Scenario: Do that thing with the thing"> - <Section name="Given: This stuff exists"> - <Section name=" When: I do this"> - <Section name=" Then: it should do this"> + <Section name=" Given: This stuff exists"> + <Section name=" When: I do this"> + <Section name=" Then: it should do this"> BDDTests.cpp" line="21"> <Original> itDoesThis() @@ -11074,7 +11317,7 @@ BDDTests.cpp" line="21"> true </Expanded> </Expression> - <Section name=" And: do that"> + <Section name=" And: do that"> BDDTests.cpp" line="23"> <Original> itDoesThat() @@ -11093,6 +11336,183 @@ BDDTests.cpp" line="23"> </Section> <OverallResult success="true"/> </TestCase> + <TestCase name="Scenario: Vector resizing affects size and capacity"> + <Section name=" Given: an empty vector"> +BDDTests.cpp" line="32"> + <Original> + v.size() == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <Section name=" When: it is made larger"> + <Section name=" Then: the size and capacity go up"> +BDDTests.cpp" line="37"> + <Original> + v.size() == 10 + </Original> + <Expanded> |