Ignore leading/trailing whitespace in test/section specs

The leading/trailing whitespace is problematic because of e.g.
`WHEN` macro having preceeding whitespace for alignment, and it is
generally messy.

Credits to Phil who did lot of the original work.

Closes #1708
This commit is contained in:
Martin Hořeňovský
2019-09-09 11:30:45 +02:00
parent a156440b19
commit af8b2538a6
12 changed files with 219 additions and 27 deletions

View File

@@ -7901,6 +7901,92 @@ Nor would this
</Expression>
<OverallResults successes="5" failures="0" expectedFailures="0"/>
</Section>
<Section name="Leading and trailing spaces in test spec" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( " aardvark " ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( " aardvark" ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( " aardvark " ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( "aardvark " ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( "aardvark" ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<OverallResults successes="5" failures="0" expectedFailures="0"/>
</Section>
<Section name="Leading and trailing spaces in test name" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( " aardvark " ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( " aardvark" ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( " aardvark " ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( "aardvark " ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
spec.matches( fakeTestCase( "aardvark" ) )
</Original>
<Expanded>
true
</Expanded>
</Expression>
<OverallResults successes="5" failures="0" expectedFailures="0"/>
</Section>
<OverallResult success="true"/>
</TestCase>
<TestCase name="Pointers can be compared to null" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
@@ -14826,7 +14912,7 @@ loose text artifact
</Section>
<OverallResult success="true"/>
</TestCase>
<OverallResults successes="1406" failures="149" expectedFailures="21"/>
<OverallResults successes="1416" failures="149" expectedFailures="21"/>
</Group>
<OverallResults successes="1406" failures="148" expectedFailures="21"/>
<OverallResults successes="1416" failures="148" expectedFailures="21"/>
</Catch>