This commit is contained in:
Phil Nash 2014-12-21 00:20:09 +00:00
parent 3f9e3e21ea
commit 3dc3763b07
4 changed files with 252 additions and 15 deletions

View File

@ -759,7 +759,7 @@ warning:
error
-------------------------------------------------------------------------------
A failing expression with a non streamable type is still captured[failing]
A failing expression with a non streamable type is still captured
-------------------------------------------------------------------------------
TrickyTests.cpp:<line number>
...............................................................................
@ -775,7 +775,7 @@ with expansion:
{?} == {?}
-------------------------------------------------------------------------------
string literals of different sizes can be compared[failing]
string literals of different sizes can be compared
-------------------------------------------------------------------------------
TrickyTests.cpp:<line number>
...............................................................................
@ -786,6 +786,6 @@ with expansion:
"first" == "second"
===============================================================================
test cases: 148 | 109 passed | 38 failed | 1 failed as expected
assertions: 739 | 647 passed | 79 failed | 13 failed as expected
test cases: 149 | 110 passed | 38 failed | 1 failed as expected
assertions: 751 | 659 passed | 79 failed | 13 failed as expected

View File

@ -4518,6 +4518,120 @@ with expansion:
five
six"
-------------------------------------------------------------------------------
replaceInPlace
replace single char
-------------------------------------------------------------------------------
TestMain.cpp:<line number>
...............................................................................
TestMain.cpp:<line number>:
PASSED:
CHECK( replaceInPlace( letters, "b", "z" ) )
with expansion:
true
TestMain.cpp:<line number>:
PASSED:
CHECK( letters == "azcdefcg" )
with expansion:
"azcdefcg" == "azcdefcg"
-------------------------------------------------------------------------------
replaceInPlace
replace two chars
-------------------------------------------------------------------------------
TestMain.cpp:<line number>
...............................................................................
TestMain.cpp:<line number>:
PASSED:
CHECK( replaceInPlace( letters, "c", "z" ) )
with expansion:
true
TestMain.cpp:<line number>:
PASSED:
CHECK( letters == "abzdefzg" )
with expansion:
"abzdefzg" == "abzdefzg"
-------------------------------------------------------------------------------
replaceInPlace
replace first char
-------------------------------------------------------------------------------
TestMain.cpp:<line number>
...............................................................................
TestMain.cpp:<line number>:
PASSED:
CHECK( replaceInPlace( letters, "a", "z" ) )
with expansion:
true
TestMain.cpp:<line number>:
PASSED:
CHECK( letters == "zbcdefcg" )
with expansion:
"zbcdefcg" == "zbcdefcg"
-------------------------------------------------------------------------------
replaceInPlace
replace last char
-------------------------------------------------------------------------------
TestMain.cpp:<line number>
...............................................................................
TestMain.cpp:<line number>:
PASSED:
CHECK( replaceInPlace( letters, "g", "z" ) )
with expansion:
true
TestMain.cpp:<line number>:
PASSED:
CHECK( letters == "abcdefcz" )
with expansion:
"abcdefcz" == "abcdefcz"
-------------------------------------------------------------------------------
replaceInPlace
replace all chars
-------------------------------------------------------------------------------
TestMain.cpp:<line number>
...............................................................................
TestMain.cpp:<line number>:
PASSED:
CHECK( replaceInPlace( letters, letters, "replaced" ) )
with expansion:
true
TestMain.cpp:<line number>:
PASSED:
CHECK( letters == "replaced" )
with expansion:
"replaced" == "replaced"
-------------------------------------------------------------------------------
replaceInPlace
replace no chars
-------------------------------------------------------------------------------
TestMain.cpp:<line number>
...............................................................................
TestMain.cpp:<line number>:
PASSED:
CHECK_FALSE( replaceInPlace( letters, "x", "z" ) )
with expansion:
!false
TestMain.cpp:<line number>:
PASSED:
CHECK( letters == letters )
with expansion:
"abcdefcg" == "abcdefcg"
hello
hello
-------------------------------------------------------------------------------
@ -5604,7 +5718,7 @@ warning:
No assertions in test case 'Where the LHS is not a simple value[failing]'
-------------------------------------------------------------------------------
A failing expression with a non streamable type is still captured[failing]
A failing expression with a non streamable type is still captured
-------------------------------------------------------------------------------
TrickyTests.cpp:<line number>
...............................................................................
@ -5620,7 +5734,7 @@ with expansion:
{?} == {?}
-------------------------------------------------------------------------------
string literals of different sizes can be compared[failing]
string literals of different sizes can be compared
-------------------------------------------------------------------------------
TrickyTests.cpp:<line number>
...............................................................................
@ -7683,6 +7797,6 @@ with expansion:
true
===============================================================================
test cases: 148 | 93 passed | 54 failed | 1 failed as expected
assertions: 759 | 647 passed | 99 failed | 13 failed as expected
test cases: 149 | 94 passed | 54 failed | 1 failed as expected
assertions: 771 | 659 passed | 99 failed | 13 failed as expected

View File

@ -1,5 +1,5 @@
<testsuites>
<testsuite name="all tests" errors="12" failures="87" tests="759" hostname="tbd" time="{duration}" timestamp="tbd">
<testsuite name="all tests" errors="12" failures="87" tests="771" hostname="tbd" time="{duration}" timestamp="tbd">
<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 class)" time="{duration}"/>
@ -485,6 +485,12 @@ MiscTests.cpp:<line number>
<testcase classname="Long strings can be wrapped" name="With newlines/Wrapped once" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="With newlines/Wrapped twice" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="With tabs" time="{duration}"/>
<testcase classname="replaceInPlace" name="replace single char" time="{duration}"/>
<testcase classname="replaceInPlace" name="replace two chars" time="{duration}"/>
<testcase classname="replaceInPlace" name="replace first char" time="{duration}"/>
<testcase classname="replaceInPlace" name="replace last char" time="{duration}"/>
<testcase classname="replaceInPlace" name="replace all chars" time="{duration}"/>
<testcase classname="replaceInPlace" name="replace no chars" time="{duration}"/>
<testcase classname="global" name="Strings can be rendered with colour" time="{duration}">
<system-out>
hello
@ -496,7 +502,7 @@ hello
<testcase classname="global" name="Parsing a std::pair" time="{duration}"/>
<testcase classname="global" name="Where the is more to the expression after the RHS[failing]" time="{duration}"/>
<testcase classname="global" name="Where the LHS is not a simple value[failing]" time="{duration}"/>
<testcase classname="global" name="A failing expression with a non streamable type is still captured[failing]" time="{duration}">
<testcase classname="global" name="A failing expression with a non streamable type is still captured" time="{duration}">
<failure message="0x<hex digits> == 0x<hex digits>" type="CHECK">
TrickyTests.cpp:<line number>
</failure>
@ -504,7 +510,7 @@ TrickyTests.cpp:<line number>
TrickyTests.cpp:<line number>
</failure>
</testcase>
<testcase classname="global" name="string literals of different sizes can be compared[failing]" time="{duration}">
<testcase classname="global" name="string literals of different sizes can be compared" time="{duration}">
<failure message="&quot;first&quot; == &quot;second&quot;" type="REQUIRE">
TrickyTests.cpp:<line number>
</failure>

View File

@ -4714,6 +4714,123 @@ four&quot;
</Section>
<OverallResult success="true"/>
</TestCase>
<TestCase name="replaceInPlace">
<Section name="replace single char">
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
replaceInPlace( letters, &quot;b&quot;, &quot;z&quot; )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
letters == &quot;azcdefcg&quot;
</Original>
<Expanded>
&quot;azcdefcg&quot; == &quot;azcdefcg&quot;
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<Section name="replace two chars">
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
replaceInPlace( letters, &quot;c&quot;, &quot;z&quot; )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
letters == &quot;abzdefzg&quot;
</Original>
<Expanded>
&quot;abzdefzg&quot; == &quot;abzdefzg&quot;
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<Section name="replace first char">
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
replaceInPlace( letters, &quot;a&quot;, &quot;z&quot; )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
letters == &quot;zbcdefcg&quot;
</Original>
<Expanded>
&quot;zbcdefcg&quot; == &quot;zbcdefcg&quot;
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<Section name="replace last char">
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
replaceInPlace( letters, &quot;g&quot;, &quot;z&quot; )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
letters == &quot;abcdefcz&quot;
</Original>
<Expanded>
&quot;abcdefcz&quot; == &quot;abcdefcz&quot;
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<Section name="replace all chars">
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
replaceInPlace( letters, letters, &quot;replaced&quot; )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
letters == &quot;replaced&quot;
</Original>
<Expanded>
&quot;replaced&quot; == &quot;replaced&quot;
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<Section name="replace no chars">
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
!replaceInPlace( letters, &quot;x&quot;, &quot;z&quot; )
</Original>
<Expanded>
!false
</Expanded>
</Expression>
<Expression success="true" filename="projects/SelfTest/TestMain.cpp" >
<Original>
letters == letters
</Original>
<Expanded>
&quot;abcdefcg&quot; == &quot;abcdefcg&quot;
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0"/>
</Section>
<OverallResult success="true"/>
</TestCase>
<TestCase name="Strings can be rendered with colour">
<OverallResult success="true"/>
</TestCase>
@ -5774,7 +5891,7 @@ there&quot;
</Warning>
<OverallResult success="true"/>
</TestCase>
<TestCase name="A failing expression with a non streamable type is still captured[failing]">
<TestCase name="A failing expression with a non streamable type is still captured">
<Expression success="false" filename="projects/SelfTest/TrickyTests.cpp" >
<Original>
&amp;o1 == &amp;o2
@ -5793,7 +5910,7 @@ there&quot;
</Expression>
<OverallResult success="false"/>
</TestCase>
<TestCase name="string literals of different sizes can be compared[failing]">
<TestCase name="string literals of different sizes can be compared">
<Expression success="false" filename="projects/SelfTest/TrickyTests.cpp" >
<Original>
std::string( &quot;first&quot; ) == &quot;second&quot;
@ -7950,7 +8067,7 @@ there&quot;
</Section>
<OverallResult success="true"/>
</TestCase>
<OverallResults successes="647" failures="99" expectedFailures="13"/>
<OverallResults successes="659" failures="99" expectedFailures="13"/>
</Group>
<OverallResults successes="647" failures="99" expectedFailures="13"/>
<OverallResults successes="659" failures="99" expectedFailures="13"/>
</Catch>