Split approve file into multiple files

This commit is contained in:
Phil Nash 2013-09-27 19:01:14 +01:00
parent 345a4eab9b
commit 2f7a296897
8 changed files with 14604 additions and 14142 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,712 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CatchSelfTest is a Catch v1.0 b10 host application.
Run with -? for options
-------------------------------------------------------------------------------
./failing/TestClass/failingCase
-------------------------------------------------------------------------------
ClassTests.cpp
...............................................................................
ClassTests.cpp: FAILED:
REQUIRE( s == "world" )
with expansion:
"hello" == "world"
-------------------------------------------------------------------------------
./failing/Fixture/failingCase
-------------------------------------------------------------------------------
ClassTests.cpp
...............................................................................
ClassTests.cpp: FAILED:
REQUIRE( m_a == 2 )
with expansion:
1 == 2
-------------------------------------------------------------------------------
./failing/conditions/equality
-------------------------------------------------------------------------------
ConditionTests.cpp
...............................................................................
ConditionTests.cpp: FAILED:
CHECK( data.int_seven == 6 )
with expansion:
7 == 6
ConditionTests.cpp: FAILED:
CHECK( data.int_seven == 8 )
with expansion:
7 == 8
ConditionTests.cpp: FAILED:
CHECK( data.int_seven == 0 )
with expansion:
7 == 0
ConditionTests.cpp: FAILED:
CHECK( data.float_nine_point_one == Approx( 9.11f ) )
with expansion:
9.1 == Approx( 9.11 )
ConditionTests.cpp: FAILED:
CHECK( data.float_nine_point_one == Approx( 9.0f ) )
with expansion:
9.1 == Approx( 9 )
ConditionTests.cpp: FAILED:
CHECK( data.float_nine_point_one == Approx( 1 ) )
with expansion:
9.1 == Approx( 1 )
ConditionTests.cpp: FAILED:
CHECK( data.float_nine_point_one == Approx( 0 ) )
with expansion:
9.1 == Approx( 0 )
ConditionTests.cpp: FAILED:
CHECK( data.double_pi == Approx( 3.1415 ) )
with expansion:
3.1415926535 == Approx( 3.1415 )
ConditionTests.cpp: FAILED:
CHECK( data.str_hello == "goodbye" )
with expansion:
"hello" == "goodbye"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello == "hell" )
with expansion:
"hello" == "hell"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello == "hello1" )
with expansion:
"hello" == "hello1"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello.size() == 6 )
with expansion:
5 == 6
ConditionTests.cpp: FAILED:
CHECK( x == Approx( 1.301 ) )
with expansion:
1.3 == Approx( 1.301 )
-------------------------------------------------------------------------------
./failing/conditions/inequality
-------------------------------------------------------------------------------
ConditionTests.cpp
...............................................................................
ConditionTests.cpp: FAILED:
CHECK( data.int_seven != 7 )
with expansion:
7 != 7
ConditionTests.cpp: FAILED:
CHECK( data.float_nine_point_one != Approx( 9.1f ) )
with expansion:
9.1 != Approx( 9.1 )
ConditionTests.cpp: FAILED:
CHECK( data.double_pi != Approx( 3.1415926535 ) )
with expansion:
3.1415926535 != Approx( 3.14159 )
ConditionTests.cpp: FAILED:
CHECK( data.str_hello != "hello" )
with expansion:
"hello" != "hello"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello.size() != 5 )
with expansion:
5 != 5
-------------------------------------------------------------------------------
./failing/conditions/ordered
-------------------------------------------------------------------------------
ConditionTests.cpp
...............................................................................
ConditionTests.cpp: FAILED:
CHECK( data.int_seven > 7 )
with expansion:
7 > 7
ConditionTests.cpp: FAILED:
CHECK( data.int_seven < 7 )
with expansion:
7 < 7
ConditionTests.cpp: FAILED:
CHECK( data.int_seven > 8 )
with expansion:
7 > 8
ConditionTests.cpp: FAILED:
CHECK( data.int_seven < 6 )
with expansion:
7 < 6
ConditionTests.cpp: FAILED:
CHECK( data.int_seven < 0 )
with expansion:
7 < 0
ConditionTests.cpp: FAILED:
CHECK( data.int_seven < -1 )
with expansion:
7 < -1
ConditionTests.cpp: FAILED:
CHECK( data.int_seven >= 8 )
with expansion:
7 >= 8
ConditionTests.cpp: FAILED:
CHECK( data.int_seven <= 6 )
with expansion:
7 <= 6
ConditionTests.cpp: FAILED:
CHECK( data.float_nine_point_one < 9 )
with expansion:
9.1 < 9
ConditionTests.cpp: FAILED:
CHECK( data.float_nine_point_one > 10 )
with expansion:
9.1 > 10
ConditionTests.cpp: FAILED:
CHECK( data.float_nine_point_one > 9.2 )
with expansion:
9.1 > 9.2
ConditionTests.cpp: FAILED:
CHECK( data.str_hello > "hello" )
with expansion:
"hello" > "hello"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello < "hello" )
with expansion:
"hello" < "hello"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello > "hellp" )
with expansion:
"hello" > "hellp"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello > "z" )
with expansion:
"hello" > "z"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello < "hellm" )
with expansion:
"hello" < "hellm"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello < "a" )
with expansion:
"hello" < "a"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello >= "z" )
with expansion:
"hello" >= "z"
ConditionTests.cpp: FAILED:
CHECK( data.str_hello <= "a" )
with expansion:
"hello" <= "a"
-------------------------------------------------------------------------------
./failing/conditions/not
-------------------------------------------------------------------------------
ConditionTests.cpp
...............................................................................
ConditionTests.cpp: FAILED:
CHECK( false != false )
ConditionTests.cpp: FAILED:
CHECK( true != true )
ConditionTests.cpp: FAILED:
CHECK( !true )
with expansion:
false
ConditionTests.cpp: FAILED:
CHECK_FALSE( true )
ConditionTests.cpp: FAILED:
CHECK( !trueValue )
with expansion:
false
ConditionTests.cpp: FAILED:
CHECK_FALSE( trueValue )
with expansion:
!true
ConditionTests.cpp: FAILED:
CHECK( !(1 == 1) )
with expansion:
false
ConditionTests.cpp: FAILED:
CHECK_FALSE( 1 == 1 )
with expansion:
!(1 == 1)
-------------------------------------------------------------------------------
./failing/exceptions/explicit
-------------------------------------------------------------------------------
ExceptionTests.cpp
...............................................................................
ExceptionTests.cpp: FAILED:
CHECK_THROWS_AS( thisThrows() )
due to unexpected exception with message:
expected exception
ExceptionTests.cpp: FAILED:
CHECK_THROWS_AS( thisDoesntThrow() )
because no exception was thrown where one was expected:
ExceptionTests.cpp: FAILED:
CHECK_NOTHROW( thisThrows() )
due to unexpected exception with message:
expected exception
-------------------------------------------------------------------------------
./failing/exceptions/implicit
-------------------------------------------------------------------------------
ExceptionTests.cpp
...............................................................................
ExceptionTests.cpp: FAILED:
due to unexpected exception with message:
unexpected exception
-------------------------------------------------------------------------------
./failing/exceptions/implicit/2
-------------------------------------------------------------------------------
ExceptionTests.cpp
...............................................................................
ExceptionTests.cpp: FAILED:
{Unknown expression after the reported line}
due to unexpected exception with message:
unexpected exception
-------------------------------------------------------------------------------
./failing/exceptions/implicit/3
section name
-------------------------------------------------------------------------------
ExceptionTests.cpp
...............................................................................
ExceptionTests.cpp: FAILED:
due to unexpected exception with message:
unexpected exception
-------------------------------------------------------------------------------
./failing/exceptions/implicit/4
-------------------------------------------------------------------------------
ExceptionTests.cpp
...............................................................................
ExceptionTests.cpp: FAILED:
CHECK( thisThrows() == 0 )
due to unexpected exception with message:
expected exception
-------------------------------------------------------------------------------
./failing/exceptions/custom
-------------------------------------------------------------------------------
ExceptionTests.cpp
...............................................................................
ExceptionTests.cpp: FAILED:
due to unexpected exception with message:
custom exception
-------------------------------------------------------------------------------
./failing/exceptions/custom/nothrow
-------------------------------------------------------------------------------
ExceptionTests.cpp
...............................................................................
ExceptionTests.cpp: FAILED:
REQUIRE_NOTHROW( throwCustom() )
due to unexpected exception with message:
custom exception - not std
-------------------------------------------------------------------------------
./failing/exceptions/custom/throw
-------------------------------------------------------------------------------
ExceptionTests.cpp
...............................................................................
ExceptionTests.cpp: FAILED:
REQUIRE_THROWS_AS( throwCustom() )
due to unexpected exception with message:
custom exception - not std
-------------------------------------------------------------------------------
./failing/exceptions/custom/double
-------------------------------------------------------------------------------
ExceptionTests.cpp
...............................................................................
ExceptionTests.cpp: FAILED:
due to unexpected exception with message:
3.14
-------------------------------------------------------------------------------
./failing/message/info/1
-------------------------------------------------------------------------------
MessageTests.cpp
...............................................................................
MessageTests.cpp: FAILED:
REQUIRE( a == 1 )
with expansion:
2 == 1
with messages:
this message should be logged
so should this
-------------------------------------------------------------------------------
./mixed/message/info/2
-------------------------------------------------------------------------------
MessageTests.cpp
...............................................................................
MessageTests.cpp: FAILED:
CHECK( a == 1 )
with expansion:
2 == 1
with messages:
this message may be logged later
this message should be logged
MessageTests.cpp: FAILED:
CHECK( a == 0 )
with expansion:
2 == 0
with message:
and this, but later
-------------------------------------------------------------------------------
./failing/message/fail
-------------------------------------------------------------------------------
MessageTests.cpp
...............................................................................
MessageTests.cpp: FAILED:
explicitly with message:
This is a failure
-------------------------------------------------------------------------------
./failing/message/sections
one
-------------------------------------------------------------------------------
MessageTests.cpp
...............................................................................
MessageTests.cpp: FAILED:
explicitly with message:
Message from section one
-------------------------------------------------------------------------------
./failing/message/sections
two
-------------------------------------------------------------------------------
MessageTests.cpp
...............................................................................
MessageTests.cpp: FAILED:
explicitly with message:
Message from section two
Message from section one
Message from section two
-------------------------------------------------------------------------------
./mixed/message/scoped
-------------------------------------------------------------------------------
MessageTests.cpp
...............................................................................
MessageTests.cpp: FAILED:
REQUIRE( i < 10 )
with expansion:
10 < 10
with messages:
current counter 10
i := 10
-------------------------------------------------------------------------------
just failure
-------------------------------------------------------------------------------
MessageTests.cpp
...............................................................................
MessageTests.cpp: FAILED:
explicitly with message:
Previous info should not be seen
-------------------------------------------------------------------------------
./mixed/Misc/Sections/nested2
s1
s2
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
REQUIRE( a == b )
with expansion:
1 == 2
-------------------------------------------------------------------------------
./mixed/Misc/Sections/loops
s1
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
CHECK( b > a )
with expansion:
0 > 1
-------------------------------------------------------------------------------
./mixed/Misc/loops
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
CHECK( ( fib[i] % 2 ) == 0 )
with expansion:
1 == 0
with message:
Testing if fib[0] (1) is even
MiscTests.cpp: FAILED:
CHECK( ( fib[i] % 2 ) == 0 )
with expansion:
1 == 0
with message:
Testing if fib[1] (1) is even
MiscTests.cpp: FAILED:
CHECK( ( fib[i] % 2 ) == 0 )
with expansion:
1 == 0
with message:
Testing if fib[3] (3) is even
MiscTests.cpp: FAILED:
CHECK( ( fib[i] % 2 ) == 0 )
with expansion:
1 == 0
with message:
Testing if fib[4] (5) is even
MiscTests.cpp: FAILED:
CHECK( ( fib[i] % 2 ) == 0 )
with expansion:
1 == 0
with message:
Testing if fib[6] (13) is even
MiscTests.cpp: FAILED:
CHECK( ( fib[i] % 2 ) == 0 )
with expansion:
1 == 0
with message:
Testing if fib[7] (21) is even
Some information
An error
-------------------------------------------------------------------------------
./failing/info
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
REQUIRE( false )
with messages:
hi
i := 7
-------------------------------------------------------------------------------
./failing/checkedif
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
CHECKED_IF( flag )
with expansion:
false
MiscTests.cpp: FAILED:
REQUIRE( testCheckedIf( false ) )
with expansion:
false
-------------------------------------------------------------------------------
./failing/checkedelse
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
CHECKED_ELSE( flag )
with expansion:
false
MiscTests.cpp: FAILED:
REQUIRE( testCheckedElse( false ) )
with expansion:
false
-------------------------------------------------------------------------------
./manual/onechar
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
REQUIRE( false )
with message:
3
-------------------------------------------------------------------------------
./failing/matchers/Contains
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
CHECK_THAT( testStringForMatching() Contains( "not there" ) )
with expansion:
"this string contains 'abc' as a substring" contains: "not there"
-------------------------------------------------------------------------------
./failing/matchers/StartsWith
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
CHECK_THAT( testStringForMatching() StartsWith( "string" ) )
with expansion:
"this string contains 'abc' as a substring" starts with: "string"
-------------------------------------------------------------------------------
./failing/matchers/EndsWith
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
CHECK_THAT( testStringForMatching() EndsWith( "this" ) )
with expansion:
"this string contains 'abc' as a substring" ends with: "this"
-------------------------------------------------------------------------------
./failing/matchers/Equals
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
CHECK_THAT( testStringForMatching() Equals( "something else" ) )
with expansion:
"this string contains 'abc' as a substring" equals: "something else"
-------------------------------------------------------------------------------
./failing/CatchSectionInfiniteLoop
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
explicitly with message:
to infinity and beyond
-------------------------------------------------------------------------------
./failing/CatchSectionInfiniteLoop
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
explicitly with message:
to infinity and beyond
-------------------------------------------------------------------------------
./failing/CatchSectionInfiniteLoop
-------------------------------------------------------------------------------
MiscTests.cpp
...............................................................................
MiscTests.cpp: FAILED:
explicitly with message:
to infinity and beyond
Message from section one
Message from section two
Some information
An error
Message from section one
Message from section two
Some information
An error
hello
hello
-------------------------------------------------------------------------------
./failing/Tricky/non streamable type
-------------------------------------------------------------------------------
TrickyTests.cpp
...............................................................................
TrickyTests.cpp: FAILED:
CHECK( &o1 == &o2 )
with expansion:
0x<hex digits> == 0x<hex digits>
TrickyTests.cpp: FAILED:
CHECK( o1 == o2 )
with expansion:
{?} == {?}
-------------------------------------------------------------------------------
./failing/string literals
-------------------------------------------------------------------------------
TrickyTests.cpp
...............................................................................
TrickyTests.cpp: FAILED:
REQUIRE( std::string( "first" ) == "second" )
with expansion:
"first" == "second"
===============================================================================
121 test cases - 35 failed (744 assertions - 90 failed)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,318 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CatchSelfTest is a Catch v1.0 b10 host application.
Run with -? for options
-------------------------------------------------------------------------------
./succeeding/Approx/simple
-------------------------------------------------------------------------------
ApproxTests.cpp
...............................................................................
ApproxTests.cpp:
PASSED:
REQUIRE( d == Approx( 1.23 ) )
with expansion:
1.23 == Approx( 1.23 )
ApproxTests.cpp:
PASSED:
REQUIRE( d != Approx( 1.22 ) )
with expansion:
1.23 != Approx( 1.22 )
ApproxTests.cpp:
PASSED:
REQUIRE( d != Approx( 1.24 ) )
with expansion:
1.23 != Approx( 1.24 )
ApproxTests.cpp:
PASSED:
REQUIRE( Approx( d ) == 1.23 )
with expansion:
Approx( 1.23 ) == 1.23
ApproxTests.cpp:
PASSED:
REQUIRE( Approx( d ) != 1.22 )
with expansion:
Approx( 1.23 ) != 1.22
ApproxTests.cpp:
PASSED:
REQUIRE( Approx( d ) != 1.24 )
with expansion:
Approx( 1.23 ) != 1.24
-------------------------------------------------------------------------------
./succeeding/Approx/epsilon
-------------------------------------------------------------------------------
ApproxTests.cpp
...............................................................................
ApproxTests.cpp:
PASSED:
REQUIRE( d != Approx( 1.231 ) )
with expansion:
1.23 != Approx( 1.231 )
ApproxTests.cpp:
PASSED:
REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) )
with expansion:
1.23 == Approx( 1.231 )
-------------------------------------------------------------------------------
./succeeding/Approx/float
-------------------------------------------------------------------------------
ApproxTests.cpp
...............................................................................
ApproxTests.cpp:
PASSED:
REQUIRE( 1.23f == Approx( 1.23f ) )
with expansion:
1.23 == Approx( 1.23 )
ApproxTests.cpp:
PASSED:
REQUIRE( 0.0f == Approx( 0.0f ) )
with expansion:
0 == Approx( 0 )
-------------------------------------------------------------------------------
./succeeding/Approx/int
-------------------------------------------------------------------------------
ApproxTests.cpp
...............................................................................
ApproxTests.cpp:
PASSED:
REQUIRE( 1 == Approx( 1 ) )
ApproxTests.cpp:
PASSED:
REQUIRE( 0 == Approx( 0 ) )
-------------------------------------------------------------------------------
./succeeding/Approx/mixed
-------------------------------------------------------------------------------
ApproxTests.cpp
...............................................................................
ApproxTests.cpp:
PASSED:
REQUIRE( 1.0f == Approx( 1 ) )
with expansion:
1 == Approx( 1 )
ApproxTests.cpp:
PASSED:
REQUIRE( 0 == Approx( dZero) )
with expansion:
0 == Approx( 0 )
ApproxTests.cpp:
PASSED:
REQUIRE( 0 == Approx( dSmall ).epsilon( 0.001 ) )
with expansion:
0 == Approx( 1e-05 )
ApproxTests.cpp:
PASSED:
REQUIRE( 1.234f == Approx( dMedium ) )
with expansion:
1.234 == Approx( 1.234 )
ApproxTests.cpp:
PASSED:
REQUIRE( dMedium == Approx( 1.234f ) )
with expansion:
1.234 == Approx( 1.234 )
-------------------------------------------------------------------------------
./succeeding/Approx/custom
-------------------------------------------------------------------------------
ApproxTests.cpp
...............................................................................
ApproxTests.cpp:
PASSED:
REQUIRE( d == approx( 1.23 ) )
with expansion:
1.23 == Approx( 1.23 )
ApproxTests.cpp:
PASSED:
REQUIRE( d == approx( 1.22 ) )
with expansion:
1.23 == Approx( 1.22 )
ApproxTests.cpp:
PASSED:
REQUIRE( d == approx( 1.24 ) )
with expansion:
1.23 == Approx( 1.24 )
ApproxTests.cpp:
PASSED:
REQUIRE( d != approx( 1.25 ) )
with expansion:
1.23 != Approx( 1.25 )
ApproxTests.cpp:
PASSED:
REQUIRE( approx( d ) == 1.23 )
with expansion:
Approx( 1.23 ) == 1.23
ApproxTests.cpp:
PASSED:
REQUIRE( approx( d ) == 1.22 )
with expansion:
Approx( 1.23 ) == 1.22
ApproxTests.cpp:
PASSED:
REQUIRE( approx( d ) == 1.24 )
with expansion:
Approx( 1.23 ) == 1.24
ApproxTests.cpp:
PASSED:
REQUIRE( approx( d ) != 1.25 )
with expansion:
Approx( 1.23 ) != 1.25
-------------------------------------------------------------------------------
Approximate PI
-------------------------------------------------------------------------------
ApproxTests.cpp
...............................................................................
ApproxTests.cpp:
PASSED:
REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) )
with expansion:
3.1428571429 == Approx( 3.141 )
ApproxTests.cpp:
PASSED:
REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) )
with expansion:
3.1428571429 != Approx( 3.141 )
-------------------------------------------------------------------------------
./succeeding/TestClass/succeedingCase
-------------------------------------------------------------------------------
ClassTests.cpp
...............................................................................
ClassTests.cpp:
PASSED:
REQUIRE( s == "hello" )
with expansion:
"hello" == "hello"
-------------------------------------------------------------------------------
./failing/TestClass/failingCase
-------------------------------------------------------------------------------
ClassTests.cpp
...............................................................................
ClassTests.cpp: FAILED:
REQUIRE( s == "world" )
with expansion:
"hello" == "world"
-------------------------------------------------------------------------------
./succeeding/Fixture/succeedingCase
-------------------------------------------------------------------------------
ClassTests.cpp
...............................................................................
ClassTests.cpp:
PASSED:
REQUIRE( m_a == 1 )
with expansion:
1 == 1
-------------------------------------------------------------------------------
./failing/Fixture/failingCase
-------------------------------------------------------------------------------
ClassTests.cpp
...............................................................................
ClassTests.cpp: FAILED:
REQUIRE( m_a == 2 )
with expansion:
1 == 2
-------------------------------------------------------------------------------
./succeeding/conditions/equality
-------------------------------------------------------------------------------
ConditionTests.cpp
...............................................................................
ConditionTests.cpp:
PASSED:
REQUIRE( data.int_seven == 7 )
with expansion:
7 == 7
ConditionTests.cpp:
PASSED:
REQUIRE( data.float_nine_point_one == Approx( 9.1f ) )
with expansion:
9.1 == Approx( 9.1 )
ConditionTests.cpp:
PASSED:
REQUIRE( data.double_pi == Approx( 3.1415926535 ) )
with expansion:
3.1415926535 == Approx( 3.14159 )
ConditionTests.cpp:
PASSED:
REQUIRE( data.str_hello == "hello" )
with expansion:
"hello" == "hello"
ConditionTests.cpp:
PASSED:
REQUIRE( "hello" == data.str_hello )
with expansion:
"hello" == "hello"
ConditionTests.cpp:
PASSED:
REQUIRE( data.str_hello.size() == 5 )
with expansion:
5 == 5
ConditionTests.cpp:
PASSED:
REQUIRE( x == Approx( 1.3 ) )
with expansion:
1.3 == Approx( 1.3 )
-------------------------------------------------------------------------------
./failing/conditions/equality
-------------------------------------------------------------------------------
ConditionTests.cpp
...............................................................................
ConditionTests.cpp: FAILED:
CHECK( data.int_seven == 6 )
with expansion:
7 == 6
ConditionTests.cpp: FAILED:
CHECK( data.int_seven == 8 )
with expansion:
7 == 8
===============================================================================
13 test cases - 3 failed (40 assertions - 4 failed)

View File

@ -0,0 +1,579 @@
<testsuites>
<testsuite name="~_" errors="10" failures="99" tests="763" hostname="tbd" time="{duration}" timestamp="tbd">
<testcase classname="global" name="./succeeding/Approx/simple" time="{duration}"/>
<testcase classname="global" name="./succeeding/Approx/epsilon" time="{duration}"/>
<testcase classname="global" name="./succeeding/Approx/float" time="{duration}"/>
<testcase classname="global" name="./succeeding/Approx/int" time="{duration}"/>
<testcase classname="global" name="./succeeding/Approx/mixed" time="{duration}"/>
<testcase classname="global" name="./succeeding/Approx/custom" time="{duration}"/>
<testcase classname="global" name="Approximate PI" time="{duration}"/>
<testcase classname="TestClass" name="./succeeding/TestClass/succeedingCase" time="{duration}"/>
<testcase classname="TestClass" name="./failing/TestClass/failingCase" time="{duration}">
<failure message="&quot;hello&quot; == &quot;world&quot;" type="REQUIRE">
ClassTests.cpp
</failure>
</testcase>
<testcase classname="Fixture" name="./succeeding/Fixture/succeedingCase" time="{duration}"/>
<testcase classname="Fixture" name="./failing/Fixture/failingCase" time="{duration}">
<failure message="1 == 2" type="REQUIRE">
ClassTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/conditions/equality" time="{duration}"/>
<testcase classname="global" name="./failing/conditions/equality" time="{duration}">
<failure message="7 == 6" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="7 == 8" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="7 == 0" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="9.1 == Approx( 9.11 )" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="9.1 == Approx( 9 )" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="9.1 == Approx( 1 )" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="9.1 == Approx( 0 )" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="3.1415926535 == Approx( 3.1415 )" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; == &quot;goodbye&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; == &quot;hell&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; == &quot;hello1&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="5 == 6" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="1.3 == Approx( 1.301 )" type="CHECK">
ConditionTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/conditions/inequality" time="{duration}"/>
<testcase classname="global" name="./failing/conditions/inequality" time="{duration}">
<failure message="7 != 7" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="9.1 != Approx( 9.1 )" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="3.1415926535 != Approx( 3.14159 )" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; != &quot;hello&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="5 != 5" type="CHECK">
ConditionTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/conditions/ordered" time="{duration}"/>
<testcase classname="global" name="./failing/conditions/ordered" time="{duration}">
<failure message="7 > 7" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="7 &lt; 7" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="7 > 8" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="7 &lt; 6" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="7 &lt; 0" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="7 &lt; -1" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="7 >= 8" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="7 &lt;= 6" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="9.1 &lt; 9" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="9.1 > 10" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="9.1 > 9.2" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; > &quot;hello&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; &lt; &quot;hello&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; > &quot;hellp&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; > &quot;z&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; &lt; &quot;hellm&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; &lt; &quot;a&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; >= &quot;z&quot;" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="&quot;hello&quot; &lt;= &quot;a&quot;" type="CHECK">
ConditionTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/conditions/int literals" time="{duration}"/>
<testcase classname="global" name="./succeeding/conditions//long_to_unsigned_x" time="{duration}"/>
<testcase classname="global" name="./succeeding/conditions/const ints to int literal" time="{duration}"/>
<testcase classname="global" name="./succeeding/conditions/negative ints" time="{duration}"/>
<testcase classname="global" name="./succeeding/conditions/computed ints" time="{duration}"/>
<testcase classname="global" name="./succeeding/conditions/ptr" time="{duration}"/>
<testcase classname="global" name="./succeeding/conditions/not" time="{duration}"/>
<testcase classname="global" name="./failing/conditions/not" time="{duration}">
<failure message="false != false" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="true != true" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="false" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="!true" type="CHECK_FALSE">
ConditionTests.cpp
</failure>
<failure message="false" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="!true" type="CHECK_FALSE">
ConditionTests.cpp
</failure>
<failure message="false" type="CHECK">
ConditionTests.cpp
</failure>
<failure message="!(1 == 1)" type="CHECK_FALSE">
ConditionTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/exceptions/explicit" time="{duration}"/>
<testcase classname="global" name="./failing/exceptions/explicit" time="{duration}">
<error message="thisThrows()" type="CHECK_THROWS_AS">
expected exception
ExceptionTests.cpp
</error>
<failure message="thisDoesntThrow()" type="CHECK_THROWS_AS">
ExceptionTests.cpp
</failure>
<error message="thisThrows()" type="CHECK_NOTHROW">
expected exception
ExceptionTests.cpp
</error>
</testcase>
<testcase classname="global" name="./failing/exceptions/implicit" time="{duration}">
<error type="TEST_CASE">
unexpected exception
ExceptionTests.cpp
</error>
</testcase>
<testcase classname="global" name="./failing/exceptions/implicit/2" time="{duration}">
<error message="{Unknown expression after the reported line}">
unexpected exception
ExceptionTests.cpp
</error>
</testcase>
<testcase classname="./failing/exceptions/implicit/3" name="section name" time="{duration}">
<error type="TEST_CASE">
unexpected exception
ExceptionTests.cpp
</error>
</testcase>
<testcase classname="global" name="./failing/exceptions/implicit/4" time="{duration}">
<error message="thisThrows() == 0" type="CHECK">
expected exception
ExceptionTests.cpp
</error>
</testcase>
<testcase classname="global" name="./failing/exceptions/custom" time="{duration}">
<error type="TEST_CASE">
custom exception
ExceptionTests.cpp
</error>
</testcase>
<testcase classname="global" name="./failing/exceptions/custom/nothrow" time="{duration}">
<error message="throwCustom()" type="REQUIRE_NOTHROW">
custom exception - not std
ExceptionTests.cpp
</error>
</testcase>
<testcase classname="global" name="./failing/exceptions/custom/throw" time="{duration}">
<error message="throwCustom()" type="REQUIRE_THROWS_AS">
custom exception - not std
ExceptionTests.cpp
</error>
</testcase>
<testcase classname="global" name="./failing/exceptions/custom/double" time="{duration}">
<error type="TEST_CASE">
3.14
ExceptionTests.cpp
</error>
</testcase>
<testcase classname="global" name="./succeeding/exceptions/notimplemented" time="{duration}"/>
<testcase classname="global" name="./succeeding/generators/1" time="{duration}"/>
<testcase classname="global" name="./succeeding/generators/2" time="{duration}"/>
<testcase classname="global" name="./succeeding/message" time="{duration}"/>
<testcase classname="global" name="./succeeding/succeed" time="{duration}"/>
<testcase classname="global" name="./failing/message/info/1" time="{duration}">
<failure message="2 == 1" type="REQUIRE">
this message should be logged
so should this
MessageTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./mixed/message/info/2" time="{duration}">
<failure message="2 == 1" type="CHECK">
this message should be logged
MessageTests.cpp
</failure>
<failure message="2 == 0" type="CHECK">
and this, but later
MessageTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./failing/message/fail" time="{duration}">
<failure type="FAIL">
This is a failure
MessageTests.cpp
</failure>
</testcase>
<testcase classname="./failing/message/sections" name="one" time="{duration}">
<failure type="FAIL">
Message from section one
MessageTests.cpp
</failure>
</testcase>
<testcase classname="./failing/message/sections" name="two" time="{duration}">
<failure type="FAIL">
Message from section two
MessageTests.cpp
</failure>
</testcase>
<testcase classname="./succeeding/message/sections/stdout" name="two" time="{duration}">
<system-out>
Message from section one
Message from section two
</system-out>
</testcase>
<testcase classname="global" name="./mixed/message/scoped" time="{duration}">
<failure message="10 &lt; 10" type="REQUIRE">
current counter 10
i := 10
MessageTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/nofail" time="{duration}"/>
<testcase classname="global" name="just failure" time="{duration}">
<failure type="FAIL">
Previous info should not be seen
MessageTests.cpp
</failure>
</testcase>
<testcase classname="./succeeding/Misc/Sections" name="s1" time="{duration}"/>
<testcase classname="./succeeding/Misc/Sections" name="s2" time="{duration}"/>
<testcase classname="./succeeding/Misc/Sections/nested" name="s1" time="{duration}"/>
<testcase classname="./succeeding/Misc/Sections/nested" name="s1/s2" time="{duration}"/>
<testcase classname="./mixed/Misc/Sections/nested2" name="s1/s2" time="{duration}">
<failure message="1 == 2" type="REQUIRE">
MiscTests.cpp
</failure>
</testcase>
<testcase classname="./mixed/Misc/Sections/nested2" name="s1/s3" time="{duration}"/>
<testcase classname="./mixed/Misc/Sections/nested2" name="s1/s4" time="{duration}"/>
<testcase classname="./mixed/Misc/Sections/loops" name="s1" time="{duration}">
<failure message="0 > 1" type="CHECK">
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./mixed/Misc/loops" time="{duration}">
<failure message="1 == 0" type="CHECK">
Testing if fib[0] (1) is even
MiscTests.cpp
</failure>
<failure message="1 == 0" type="CHECK">
Testing if fib[1] (1) is even
MiscTests.cpp
</failure>
<failure message="1 == 0" type="CHECK">
Testing if fib[3] (3) is even
MiscTests.cpp
</failure>
<failure message="1 == 0" type="CHECK">
Testing if fib[4] (5) is even
MiscTests.cpp
</failure>
<failure message="1 == 0" type="CHECK">
Testing if fib[6] (13) is even
MiscTests.cpp
</failure>
<failure message="1 == 0" type="CHECK">
Testing if fib[7] (21) is even
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/Misc/stdout,stderr" time="{duration}">
<system-out>
Some information
</system-out>
<system-err>
An error
</system-err>
</testcase>
<testcase classname="global" name="./succeeding/Misc/null strings" time="{duration}"/>
<testcase classname="global" name="./failing/info" time="{duration}">
<failure message="false" type="REQUIRE">
hi
i := 7
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/checkedif" time="{duration}"/>
<testcase classname="global" name="./failing/checkedif" time="{duration}">
<failure message="false" type="CHECKED_IF">
MiscTests.cpp
</failure>
<failure message="false" type="REQUIRE">
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/checkedelse" time="{duration}"/>
<testcase classname="global" name="./failing/checkedelse" time="{duration}">
<failure message="false" type="CHECKED_ELSE">
MiscTests.cpp
</failure>
<failure message="false" type="REQUIRE">
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./manual/onechar" time="{duration}">
<failure message="false" type="REQUIRE">
3
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/atomic if" time="{duration}"/>
<testcase classname="global" name="./succeeding/matchers" time="{duration}"/>
<testcase classname="global" name="./failing/matchers/Contains" time="{duration}">
<failure message="&quot;this string contains 'abc' as a substring&quot; contains: &quot;not there&quot;" type="CHECK_THAT">
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./failing/matchers/StartsWith" time="{duration}">
<failure message="&quot;this string contains 'abc' as a substring&quot; starts with: &quot;string&quot;" type="CHECK_THAT">
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./failing/matchers/EndsWith" time="{duration}">
<failure message="&quot;this string contains 'abc' as a substring&quot; ends with: &quot;this&quot;" type="CHECK_THAT">
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./failing/matchers/Equals" time="{duration}">
<failure message="&quot;this string contains 'abc' as a substring&quot; equals: &quot;something else&quot;" type="CHECK_THAT">
MiscTests.cpp
</failure>
</testcase>
<testcase classname="global" name="string" time="{duration}"/>
<testcase classname="global" name="./succeeding/matchers/AllOf" time="{duration}"/>
<testcase classname="global" name="./succeeding/matchers/AnyOf" time="{duration}"/>
<testcase classname="global" name="./succeeding/matchers/Equals" time="{duration}"/>
<testcase classname="global" name="Factorials are computed" time="{duration}"/>
<testcase classname="global" name="Nice descriptive name" time="{duration}"/>
<testcase classname="vectors can be sized and resized" name="root" time="{duration}"/>
<testcase classname="vectors can be sized and resized" name="resizing bigger changes size and capacity" time="{duration}"/>
<testcase classname="vectors can be sized and resized" name="resizing smaller changes size but not capacity" time="{duration}"/>
<testcase classname="vectors can be sized and resized" name="resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/>
<testcase classname="vectors can be sized and resized" name="reserving bigger changes capacity but not size" time="{duration}"/>
<testcase classname="vectors can be sized and resized" name="reserving smaller does not change size or capacity" time="{duration}"/>
<testcase classname="./failing/CatchSectionInfiniteLoop" name="root" time="{duration}">
<failure type="FAIL">
to infinity and beyond
MiscTests.cpp
</failure>
<failure type="FAIL">
to infinity and beyond
MiscTests.cpp
</failure>
<failure type="FAIL">
to infinity and beyond
MiscTests.cpp
</failure>
</testcase>
<testcase classname="./failing/CatchSectionInfiniteLoop" name="Outer/Inner" time="{duration}"/>
<testcase classname="selftest/main" name="selftest/expected result/selftest/expected result/failing tests" time="{duration}"/>
<testcase classname="selftest/main" name="selftest/expected result/selftest/expected result/succeeding tests" time="{duration}"/>
<testcase classname="selftest/main" name="selftest/test counts/selftest/test counts/succeeding tests" time="{duration}"/>
<testcase classname="selftest/main" name="selftest/test counts/selftest/test counts/failing tests" time="{duration}">
<system-out>
Message from section one
Message from section two
Some information
Message from section one
Message from section two
Some information
</system-out>
<system-err>
An error
An error
</system-err>
</testcase>
<testcase classname="global" name="meta/Misc/Sections" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="default - no arguments" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="test lists/1 test" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="test lists/Specify one test case exclusion using exclude:" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="test lists/Specify one test case exclusion using ~" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="test lists/Specify two test cases using -t" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="reporter/-r/console" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="reporter/-r/xml" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="reporter/--reporter/junit" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="debugger/-b" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="debugger/--break" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="abort/-a aborts after first failure" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="abort/-x 2 aborts after two failures" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="abort/-x must be greater than zero" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="abort/-x must be numeric" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="nothrow/-e" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="nothrow/--nothrow" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="output filename/-o filename" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="output filename/--out" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="combinations/Single character flags can be combined" time="{duration}"/>
<testcase classname="global" name="selftest/test filter" time="{duration}"/>
<testcase classname="global" name="selftest/test filters" time="{duration}"/>
<testcase classname="global" name="selftest/filter/prefix wildcard" time="{duration}"/>
<testcase classname="global" name="selftest/filter/wildcard at both ends" time="{duration}"/>
<testcase classname="selftest/tags" name="one tag" time="{duration}"/>
<testcase classname="selftest/tags" name="two tags" time="{duration}"/>
<testcase classname="selftest/tags" name="complex" time="{duration}"/>
<testcase classname="selftest/tags" name="one tag with characters either side" time="{duration}"/>
<testcase classname="selftest/tags" name="start of a tag, but not closed" time="{duration}"/>
<testcase classname="selftest/tags" name="hidden" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/No wrapping" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/Wrapped once" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/Wrapped twice" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/Wrapped three times" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/Short wrap" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/As container" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/Indent first line differently" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="With newlines/No wrapping" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="With newlines/Trailing newline" time="{duration}"/>
<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="global" name="Strings can be rendered with colour" time="{duration}">
<system-out>
hello
hello
</system-out>
</testcase>
<testcase classname="global" name="Text can be formatted using the Text class" time="{duration}"/>
<testcase classname="global" name="./succeeding/Tricky/std::pair" time="{duration}"/>
<testcase classname="global" name="./inprogress/failing/Tricky/trailing expression" time="{duration}"/>
<testcase classname="global" name="./inprogress/failing/Tricky/compound lhs" time="{duration}"/>
<testcase classname="global" name="./failing/Tricky/non streamable type" time="{duration}">
<failure message="0x<hex digits> == 0x<hex digits>" type="CHECK">
TrickyTests.cpp
</failure>
<failure message="{?} == {?}" type="CHECK">
TrickyTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./failing/string literals" time="{duration}">
<failure message="&quot;first&quot; == &quot;second&quot;" type="REQUIRE">
TrickyTests.cpp
</failure>
</testcase>
<testcase classname="global" name="./succeeding/side-effects" time="{duration}"/>
<testcase classname="global" name="./succeeding/koenig" time="{duration}"/>
<testcase classname="global" name="./succeeding/non-const==" time="{duration}"/>
<testcase classname="global" name="./succeeding/enum/bits" time="{duration}"/>
<testcase classname="global" name="./succeeding/boolean member" time="{duration}"/>
<testcase classname="./succeeding/unimplemented static bool" name="compare to true" time="{duration}"/>
<testcase classname="./succeeding/unimplemented static bool" name="compare to false" time="{duration}"/>
<testcase classname="./succeeding/unimplemented static bool" name="negation" time="{duration}"/>
<testcase classname="./succeeding/unimplemented static bool" name="double negation" time="{duration}"/>
<testcase classname="./succeeding/unimplemented static bool" name="direct" time="{duration}"/>
<testcase classname="global" name="./succeeding/SafeBool" time="{duration}"/>
<testcase classname="Assertions then sections" name="root" time="{duration}"/>
<testcase classname="Assertions then sections" name="A section" time="{duration}"/>
<testcase classname="Assertions then sections" name="A section/Another section" time="{duration}"/>
<testcase classname="Assertions then sections" name="A section/Another other section" time="{duration}"/>
<testcase classname="global" name="non streamable - with conv. op" time="{duration}"/>
<testcase classname="global" name="Comparing function pointers" time="{duration}"/>
<testcase classname="global" name="pointer to class" time="{duration}"/>
<testcase classname="global" name="X/level/0/a" time="{duration}"/>
<testcase classname="global" name="X/level/0/b" time="{duration}"/>
<testcase classname="global" name="X/level/1/a" time="{duration}"/>
<testcase classname="global" name="X/level/1/b" time="{duration}"/>
<testcase classname="global" name="Anonymous test case 1" time="{duration}"/>
<testcase classname="global" name="Test case with one argument" time="{duration}"/>
<testcase classname="Variadic macros" name="Section with one argument" time="{duration}"/>
<testcase classname="Scenario: Do that thing with the thing" name="Given: This stuff exists/When: I do this/Then: it should do this" time="{duration}"/>
<testcase classname="Scenario: Do that thing with the thing" name="Given: This stuff exists/When: I do this/Then: it should do this/And: do that" time="{duration}"/>
<testcase classname="Scenario: Vector resizing affects size and capacity" name="Given: an empty vector" time="{duration}"/>
<testcase classname="Scenario: Vector resizing affects size and capacity" name="Given: an empty vector/When: it is made larger/Then: the size and capacity go up" time="{duration}"/>
<testcase classname="Scenario: Vector resizing affects size and capacity" name="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" time="{duration}"/>
<testcase classname="Scenario: Vector resizing affects size and capacity" name="Given: an empty vector/When: we reserve more space/Then: The capacity is increased but the size remains the same" time="{duration}"/>
<testcase classname="Scenario: This is a really long scenario name to see how the list command deals with wrapping" name="Given: A section name that is so long that it cannot fit in a single console width/When: The test headers are printed as part of the normal running of the scenario/Then: The, deliberately very long and overly verbose (you see what I did there?) section names must wrap, along with an indent" time="{duration}"/>
<testcase classname="cmdline" name="process name" time="{duration}"/>
<testcase classname="cmdline" name="arg separated by spaces" time="{duration}"/>
<testcase classname="cmdline" name="arg separated by colon" time="{duration}"/>
<testcase classname="cmdline" name="arg separated by =" time="{duration}"/>
<testcase classname="cmdline" name="long opt" time="{duration}"/>
<testcase classname="cmdline" name="a number" time="{duration}"/>
<testcase classname="cmdline" name="not a number" time="{duration}"/>
<testcase classname="cmdline" name="two parsers" time="{duration}"/>
<testcase classname="cmdline" name="methods/in range" time="{duration}"/>
<testcase classname="cmdline" name="methods/out of range" time="{duration}"/>
<testcase classname="cmdline" name="flags/set" time="{duration}"/>
<testcase classname="cmdline" name="flags/not set" time="{duration}"/>
<testcase classname="cmdline" name="positional" time="{duration}"/>
<testcase classname="section tracking" name="root" time="{duration}"/>
<testcase classname="section tracking" name="test case with no sections" time="{duration}"/>
<testcase classname="section tracking" name="test case with one section" time="{duration}"/>
<testcase classname="section tracking" name="test case with two consecutive sections" time="{duration}"/>
<testcase classname="section tracking" name="test case with one section within another" time="{duration}"/>
<system-out>
Message from section one
Message from section two
Some information
Message from section one
Message from section two
Some information
Message from section one
Message from section two
Some information
hello
hello
</system-out>
<system-err>
An error
An error
An error
</system-err>
</testsuite>
</testsuites>

File diff suppressed because it is too large Load Diff

View File

@ -10,28 +10,14 @@ lineNumberParser = re.compile( r'(.*)line="[0-9]*"(.*)' )
hexParser = re.compile( r'(.*)\b(0[xX][0-9a-fA-F]+)\b(.*)' ) hexParser = re.compile( r'(.*)\b(0[xX][0-9a-fA-F]+)\b(.*)' )
durationsParser = re.compile( r'(.*)time="[0-9]*\.[0-9]*"(.*)' ) durationsParser = re.compile( r'(.*)time="[0-9]*\.[0-9]*"(.*)' )
#catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0])))
baselinesPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/approvedResults.txt' )
rawResultsPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/_rawResults.tmp' )
filteredResultsPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/unapprovedResults.txt' )
if len(sys.argv) == 2: if len(sys.argv) == 2:
cmdPath = sys.argv[1] cmdPath = sys.argv[1]
else: else:
cmdPath = os.path.join( catchPath, 'projects/XCode4/CatchSelfTest/DerivedData/CatchSelfTest/Build/Products/Debug/CatchSelfTest' ) cmdPath = os.path.join( catchPath, 'projects/XCode4/CatchSelfTest/DerivedData/CatchSelfTest/Build/Products/Debug/CatchSelfTest' )
f = open( rawResultsPath, 'w' ) overallResult = 0
subprocess.call([ cmdPath, "~dummy", "-r", "console" ], stdout=f, stderr=f )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "console" ], stdout=f, stderr=f )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "console", "-a", "4" ], stdout=f, stderr=f )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "junit" ], stdout=f, stderr=f )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "xml" ], stdout=f, stderr=f )
f.close()
rawFile = open( rawResultsPath, 'r' ) def filterLine( line ):
filteredFile = open( filteredResultsPath, 'w' )
for line in rawFile:
m = filenameParser.match( line ) m = filenameParser.match( line )
if m: if m:
line = m.group(1) + m.group(3) line = m.group(1) + m.group(3)
@ -49,18 +35,55 @@ for line in rawFile:
m = durationsParser.match( line ) m = durationsParser.match( line )
if m: if m:
line = m.group(1) + 'time="{duration}"' + m.group(2) line = m.group(1) + 'time="{duration}"' + m.group(2)
return line
filteredFile.write( line.rstrip() + "\n" ) def approve( baseName, args ):
filteredFile.close() global overallResult
rawFile.close() args[0:0] = [cmdPath]
baselinesPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/{0}.approved.txt'.format( baseName ) )
rawResultsPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/_{0}.tmp'.format( baseName ) )
filteredResultsPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/{0}.unapproved.txt'.format( baseName ) )
os.remove( rawResultsPath ) f = open( rawResultsPath, 'w' )
print subprocess.call( args, stdout=f, stderr=f )
diffResult = subprocess.call([ "diff", baselinesPath, filteredResultsPath ] ) f.close()
if diffResult == 0:
os.remove( filteredResultsPath ) rawFile = open( rawResultsPath, 'r' )
print "\033[92mResults matched" filteredFile = open( filteredResultsPath, 'w' )
else: for line in rawFile:
print "\n****************************\n\033[91mResults differed" filteredFile.write( filterLine( line ).rstrip() + "\n" )
print "\033[0m" filteredFile.close()
exit( diffResult) rawFile.close()
os.remove( rawResultsPath )
print
print baseName + ":"
if os.path.exists( baselinesPath ):
diffResult = subprocess.call([ "diff", baselinesPath, filteredResultsPath ] )
if diffResult == 0:
os.remove( filteredResultsPath )
print " \033[92mResults matched"
else:
print " \n****************************\n \033[91mResults differed"
if diffResult > overallResult:
overallResult = diffResult
print "\033[0m"
else:
print " first approval"
if overallResult == 0:
overallResult = 1
# Standard console reporter
approve( "console.std", ["~_"] )
# console reporter, include passes, warn about No Assertions
approve( "console.sw", ["~_", "-s", "-w", "NoAssertions"] )
# console reporter, include passes, warn about No Assertions, limit failures to first 4
approve( "console.swa4", ["~_", "-s", "-w", "NoAssertions", "-x", "4"] )
# junit reporter, include passes, warn about No Assertions
approve( "junit.sw", ["~_", "-s", "-w", "NoAssertions", "-r", "junit"] )
# xml reporter, include passes, warn about No Assertions
approve( "xml.sw", ["~_", "-s", "-w", "NoAssertions", "-r", "xml"] )
if overallResult <> 0:
print "run approve.py to approve new baselines"
exit( overallResult)

View File

@ -1,14 +1,29 @@
import os import os
import sys import sys
import shutil import shutil
import glob
from scriptCommon import catchPath from scriptCommon import catchPath
baselinesPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/approvedResults.txt' ) rootPath = os.path.join( catchPath, 'projects/SelfTest/Baselines' )
filteredResultsPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/unapprovedResults.txt' )
if os.path.isfile( filteredResultsPath ): if len(sys.argv) > 1:
os.remove( baselinesPath ) files = [os.path.join( rootPath, f ) for f in sys.argv[1:]]
os.rename( filteredResultsPath, baselinesPath )
else: else:
print "approval file " + filteredResultsPath + " does not exist" files = glob.glob( os.path.join( rootPath, "*.unapproved.txt" ) )
def approveFile( approvedFile, unapprovedFile ):
justFilename = unapprovedFile[len(rootPath)+1:]
if os.path.exists( unapprovedFile ):
if os.path.exists( approvedFile ):
os.remove( approvedFile )
os.rename( unapprovedFile, approvedFile )
print "approved " + justFilename
else:
print "approval file " + justFilename + " does not exist"
if len(files) > 0:
for unapprovedFile in files:
approveFile( unapprovedFile.replace( "unapproved.txt", "approved.txt" ), unapprovedFile )
else:
print "no files to approve"