Skip to content

Commit

Permalink
Fixed test names mentioning the new Matcher combinator operators
Browse files Browse the repository at this point in the history
  • Loading branch information
philsquared committed Nov 6, 2015
1 parent 08844e7 commit 71fd2c2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion projects/SelfTest/Baselines/console.std.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ with expansion:
"this string contains 'abc' as a substring" equals: "something else"

-------------------------------------------------------------------------------
Matchers can be composed with both + and | - failing
Matchers can be composed with both && and || - failing
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................
Expand Down
8 changes: 4 additions & 4 deletions projects/SelfTest/Baselines/console.sw.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3419,7 +3419,7 @@ with expansion:
'abc' as a substring"

-------------------------------------------------------------------------------
Matchers can be (AllOf) composed with the + operator
Matchers can be (AllOf) composed with the && operator
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................
Expand All @@ -3432,7 +3432,7 @@ with expansion:
contains: "abc" and contains: "substring" and contains: "contains" )

-------------------------------------------------------------------------------
Matchers can be (AnyOf) composed with the | operator
Matchers can be (AnyOf) composed with the || operator
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................
Expand All @@ -3452,7 +3452,7 @@ with expansion:
"string" or contains: "different" or contains: "random" )

-------------------------------------------------------------------------------
Matchers can be composed with both + and |
Matchers can be composed with both && and ||
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................
Expand All @@ -3465,7 +3465,7 @@ with expansion:
contains: "different" ) and contains: "substring" )

-------------------------------------------------------------------------------
Matchers can be composed with both + and | - failing
Matchers can be composed with both && and || - failing
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................
Expand Down
8 changes: 4 additions & 4 deletions projects/SelfTest/Baselines/junit.sw.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ MiscTests.cpp:<line number>
<testcase classname="global" name="AllOf matcher" time="{duration}"/>
<testcase classname="global" name="AnyOf matcher" time="{duration}"/>
<testcase classname="global" name="Equals" time="{duration}"/>
<testcase classname="global" name="Matchers can be (AllOf) composed with the + operator" time="{duration}"/>
<testcase classname="global" name="Matchers can be (AnyOf) composed with the | operator" time="{duration}"/>
<testcase classname="global" name="Matchers can be composed with both + and |" time="{duration}"/>
<testcase classname="global" name="Matchers can be composed with both + and | - failing" time="{duration}">
<testcase classname="global" name="Matchers can be (AllOf) composed with the &amp;&amp; operator" time="{duration}"/>
<testcase classname="global" name="Matchers can be (AnyOf) composed with the || operator" time="{duration}"/>
<testcase classname="global" name="Matchers can be composed with both &amp;&amp; and ||" time="{duration}"/>
<testcase classname="global" name="Matchers can be composed with both &amp;&amp; and || - failing" time="{duration}">
<failure message="&quot;this string contains 'abc' as a substring&quot; ( ( contains: &quot;string&quot; or contains: &quot;different&quot; ) and contains: &quot;random&quot; )" type="CHECK_THAT">
MiscTests.cpp:<line number>
</failure>
Expand Down
8 changes: 4 additions & 4 deletions projects/SelfTest/Baselines/xml.sw.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3590,7 +3590,7 @@
</Expression>
<OverallResult success="true"/>
</TestCase>
<TestCase name="Matchers can be (AllOf) composed with the + operator">
<TestCase name="Matchers can be (AllOf) composed with the &amp;&amp; operator">
<Expression success="true" type="CHECK_THAT" filename="projects/SelfTest/MiscTests.cpp" >
<Original>
testStringForMatching() Contains( "string" ) &amp;&amp; Contains( "abc" ) &amp;&amp; Contains( "substring" ) &amp;&amp; Contains( "contains" )
Expand All @@ -3601,7 +3601,7 @@
</Expression>
<OverallResult success="true"/>
</TestCase>
<TestCase name="Matchers can be (AnyOf) composed with the | operator">
<TestCase name="Matchers can be (AnyOf) composed with the || operator">
<Expression success="true" type="CHECK_THAT" filename="projects/SelfTest/MiscTests.cpp" >
<Original>
testStringForMatching() Contains( "string" ) || Contains( "different" ) || Contains( "random" )
Expand All @@ -3620,7 +3620,7 @@
</Expression>
<OverallResult success="true"/>
</TestCase>
<TestCase name="Matchers can be composed with both + and |">
<TestCase name="Matchers can be composed with both &amp;&amp; and ||">
<Expression success="true" type="CHECK_THAT" filename="projects/SelfTest/MiscTests.cpp" >
<Original>
testStringForMatching() ( Contains( "string" ) || Contains( "different" ) ) &amp;&amp; Contains( "substring" )
Expand All @@ -3631,7 +3631,7 @@
</Expression>
<OverallResult success="true"/>
</TestCase>
<TestCase name="Matchers can be composed with both + and | - failing">
<TestCase name="Matchers can be composed with both &amp;&amp; and || - failing">
<Expression success="false" type="CHECK_THAT" filename="projects/SelfTest/MiscTests.cpp" >
<Original>
testStringForMatching() ( Contains( "string" ) || Contains( "different" ) ) &amp;&amp; Contains( "random" )
Expand Down
8 changes: 4 additions & 4 deletions projects/SelfTest/MiscTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ TEST_CASE("Equals", "[matchers]")
CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) );
}

TEST_CASE("Matchers can be (AllOf) composed with the + operator", "[matchers][operators][operator+]")
TEST_CASE("Matchers can be (AllOf) composed with the && operator", "[matchers][operators][operator&&]")
{
CHECK_THAT( testStringForMatching(),
Contains( "string" ) &&
Expand All @@ -271,18 +271,18 @@ TEST_CASE("Matchers can be (AllOf) composed with the + operator", "[matchers][op
Contains( "contains" ) );
}

TEST_CASE("Matchers can be (AnyOf) composed with the | operator", "[matchers][operators][operator|]")
TEST_CASE("Matchers can be (AnyOf) composed with the || operator", "[matchers][operators][operator||]")
{
CHECK_THAT( testStringForMatching(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) );
CHECK_THAT( testStringForMatching2(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) );
}

TEST_CASE("Matchers can be composed with both + and |", "[matchers][operators][operator|][operator+]")
TEST_CASE("Matchers can be composed with both && and ||", "[matchers][operators][operator||][operator&&]")
{
CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "substring" ) );
}

TEST_CASE("Matchers can be composed with both + and | - failing", "[matchers][operators][operator|][operator+][.failing]")
TEST_CASE("Matchers can be composed with both && and || - failing", "[matchers][operators][operator||][operator&&][.failing]")
{
CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) );
}
Expand Down

0 comments on commit 71fd2c2

Please sign in to comment.