mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Merged from develop
This commit is contained in:
@@ -6,6 +6,11 @@ project(Catch)
|
||||
get_filename_component(CATCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
|
||||
get_filename_component(CATCH_DIR "${CATCH_DIR}" PATH)
|
||||
set(SELF_TEST_DIR ${CATCH_DIR}/projects/SelfTest)
|
||||
if(USE_CPP11)
|
||||
## We can't turn this on by default, since it breaks on travis
|
||||
message(STATUS "Enabling C++11")
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
# define the sources of the self test
|
||||
set(SOURCES
|
||||
@@ -21,6 +26,11 @@ set(SOURCES
|
||||
${SELF_TEST_DIR}/TestMain.cpp
|
||||
${SELF_TEST_DIR}/TrickyTests.cpp
|
||||
${SELF_TEST_DIR}/VariadicMacrosTests.cpp
|
||||
${SELF_TEST_DIR}/EnumToString.cpp
|
||||
${SELF_TEST_DIR}/ToStringPair.cpp
|
||||
${SELF_TEST_DIR}/ToStringVector.cpp
|
||||
${SELF_TEST_DIR}/ToStringWhich.cpp
|
||||
${SELF_TEST_DIR}/ToStringTuple.cpp
|
||||
)
|
||||
|
||||
# configure the executable
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
CatchSelfTest is a <version> host application.
|
||||
CatchSelfTest is a <version> (develop) host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -737,7 +737,7 @@ with expansion:
|
||||
hello
|
||||
hello
|
||||
-------------------------------------------------------------------------------
|
||||
Where the is more to the expression after the RHS[failing]
|
||||
Where there is more to the expression after the RHS
|
||||
-------------------------------------------------------------------------------
|
||||
TrickyTests.cpp:<line number>
|
||||
...............................................................................
|
||||
@@ -748,7 +748,7 @@ warning:
|
||||
error
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Where the LHS is not a simple value[failing]
|
||||
Where the LHS is not a simple value
|
||||
-------------------------------------------------------------------------------
|
||||
TrickyTests.cpp:<line number>
|
||||
...............................................................................
|
||||
@@ -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: 130 | 91 passed | 38 failed | 1 failed as expected
|
||||
assertions: 709 | 617 passed | 79 failed | 13 failed as expected
|
||||
test cases: 155 | 116 passed | 38 failed | 1 failed as expected
|
||||
assertions: 765 | 673 passed | 79 failed | 13 failed as expected
|
||||
|
||||
|
@@ -1,8 +1,88 @@
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
CatchSelfTest is a <version> host application.
|
||||
CatchSelfTest is a <version> (develop) host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString(enum)
|
||||
-------------------------------------------------------------------------------
|
||||
EnumToString.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e0) == "0" )
|
||||
with expansion:
|
||||
"0" == "0"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e1) == "1" )
|
||||
with expansion:
|
||||
"1" == "1"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString(enum w/operator<<)
|
||||
-------------------------------------------------------------------------------
|
||||
EnumToString.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e0) == "E2{0}" )
|
||||
with expansion:
|
||||
"E2{0}" == "E2{0}"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e1) == "E2{1}" )
|
||||
with expansion:
|
||||
"E2{1}" == "E2{1}"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString(enum class)
|
||||
-------------------------------------------------------------------------------
|
||||
EnumToString.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e0) == "0" )
|
||||
with expansion:
|
||||
"0" == "0"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e1) == "1" )
|
||||
with expansion:
|
||||
"1" == "1"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString(enum class w/operator<<)
|
||||
-------------------------------------------------------------------------------
|
||||
EnumToString.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e0) == "E2/V0" )
|
||||
with expansion:
|
||||
"E2/V0" == "E2/V0"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e1) == "E2/V1" )
|
||||
with expansion:
|
||||
"E2/V1" == "E2/V1"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e3) == "Unknown enum value 10" )
|
||||
with expansion:
|
||||
"Unknown enum value 10"
|
||||
==
|
||||
"Unknown enum value 10"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Some simple comparisons between doubles
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -3318,7 +3398,7 @@ MiscTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Factorial(10) == 3628800 )
|
||||
with expansion:
|
||||
0x<hex digits> == 3628800
|
||||
0x<hex digits> == 0x<hex digits>
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
An empty test with no assertions
|
||||
@@ -3985,6 +4065,42 @@ PASSED:
|
||||
with expansion:
|
||||
true == true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Process can be configured on command line
|
||||
force-colour
|
||||
--force-colour
|
||||
-------------------------------------------------------------------------------
|
||||
TestMain.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
TestMain.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK_NOTHROW( parseIntoConfig( argv, config ) )
|
||||
|
||||
TestMain.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( config.forceColour )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Process can be configured on command line
|
||||
force-colour
|
||||
without --force-colour
|
||||
-------------------------------------------------------------------------------
|
||||
TestMain.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
TestMain.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK_NOTHROW( parseIntoConfig( argv, config ) )
|
||||
|
||||
TestMain.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( !config.forceColour )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Long strings can be wrapped
|
||||
plain string
|
||||
@@ -4438,6 +4554,139 @@ 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"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
replaceInPlace
|
||||
escape '
|
||||
-------------------------------------------------------------------------------
|
||||
TestMain.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
TestMain.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( replaceInPlace( s, "'", "|'" ) )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
TestMain.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( s == "didn|'t" )
|
||||
with expansion:
|
||||
"didn|'t" == "didn|'t"
|
||||
|
||||
hello
|
||||
hello
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -5496,7 +5745,7 @@ with expansion:
|
||||
std::pair( 1, 2 ) == std::pair( 1, 2 )
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Where the is more to the expression after the RHS[failing]
|
||||
Where there is more to the expression after the RHS
|
||||
-------------------------------------------------------------------------------
|
||||
TrickyTests.cpp:<line number>
|
||||
...............................................................................
|
||||
@@ -5507,10 +5756,10 @@ warning:
|
||||
error
|
||||
|
||||
|
||||
No assertions in test case 'Where the is more to the expression after the RHS[failing]'
|
||||
No assertions in test case 'Where there is more to the expression after the RHS'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Where the LHS is not a simple value[failing]
|
||||
Where the LHS is not a simple value
|
||||
-------------------------------------------------------------------------------
|
||||
TrickyTests.cpp:<line number>
|
||||
...............................................................................
|
||||
@@ -5521,10 +5770,10 @@ warning:
|
||||
error
|
||||
|
||||
|
||||
No assertions in test case 'Where the LHS is not a simple value[failing]'
|
||||
No assertions in test case 'Where the LHS is not a simple value'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
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>
|
||||
...............................................................................
|
||||
@@ -5540,7 +5789,7 @@ with expansion:
|
||||
{?} == {?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
string literals of different sizes can be compared[failing]
|
||||
string literals of different sizes can be compared
|
||||
-------------------------------------------------------------------------------
|
||||
TrickyTests.cpp:<line number>
|
||||
...............................................................................
|
||||
@@ -5905,6 +6154,234 @@ TrickyTests.cpp:<line number>
|
||||
TrickyTests.cpp:<line number>:
|
||||
PASSED:
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString( has_toString )
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringWhich.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringWhich.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString( item ) == "toString( has_toString )" )
|
||||
with expansion:
|
||||
"toString( has_toString )"
|
||||
==
|
||||
"toString( has_toString )"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString( has_maker )
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringWhich.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringWhich.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString( item ) == "StringMaker<has_maker>" )
|
||||
with expansion:
|
||||
"StringMaker<has_maker>"
|
||||
==
|
||||
"StringMaker<has_maker>"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString( has_maker_and_toString )
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringWhich.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringWhich.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString( item ) == "toString( has_maker_and_toString )" )
|
||||
with expansion:
|
||||
"toString( has_maker_and_toString )"
|
||||
==
|
||||
"toString( has_maker_and_toString )"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString( vectors<has_toString )
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringWhich.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringWhich.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString( v ) == "{ {?} }" )
|
||||
with expansion:
|
||||
"{ {?} }" == "{ {?} }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString( vectors<has_maker )
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringWhich.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringWhich.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString( v ) == "{ StringMaker<has_maker> }" )
|
||||
with expansion:
|
||||
"{ StringMaker<has_maker> }"
|
||||
==
|
||||
"{ StringMaker<has_maker> }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString( vectors<has_maker_and_toString )
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringWhich.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringWhich.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString( v ) == "{ StringMaker<has_maker_and_toString> }" )
|
||||
with expansion:
|
||||
"{ StringMaker<has_maker_and_toString> }"
|
||||
==
|
||||
"{ StringMaker<has_maker_and_toString> }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
std::pair<int,std::string> -> toString
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringPair.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringPair.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString( value ) == "{ 34, \"xyzzy\" }" )
|
||||
with expansion:
|
||||
"{ 34, "xyzzy" }" == "{ 34, "xyzzy" }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
std::pair<int,const std::string> -> toString
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringPair.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringPair.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(value) == "{ 34, \"xyzzy\" }" )
|
||||
with expansion:
|
||||
"{ 34, "xyzzy" }" == "{ 34, "xyzzy" }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
std::vector<std::pair<std::string,int> > -> toString
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringPair.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringPair.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString( pr ) == "{ { \"green\", 55 } }" )
|
||||
with expansion:
|
||||
"{ { "green", 55 } }"
|
||||
==
|
||||
"{ { "green", 55 } }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
pair<pair<int,const char *,pair<std::string,int> > -> toString
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringPair.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringPair.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" )
|
||||
with expansion:
|
||||
"{ { 42, "Arthur" }, { "Ford", 24 } }"
|
||||
==
|
||||
"{ { 42, "Arthur" }, { "Ford", 24 } }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
vector<int> -> toString
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringVector.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(vv) == "{ }" )
|
||||
with expansion:
|
||||
"{ }" == "{ }"
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(vv) == "{ 42 }" )
|
||||
with expansion:
|
||||
"{ 42 }" == "{ 42 }"
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(vv) == "{ 42, 512 }" )
|
||||
with expansion:
|
||||
"{ 42, 512 }" == "{ 42, 512 }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
vector<string> -> toString
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringVector.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(vv) == "{ }" )
|
||||
with expansion:
|
||||
"{ }" == "{ }"
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(vv) == "{ \"hello\" }" )
|
||||
with expansion:
|
||||
"{ "hello" }" == "{ "hello" }"
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(vv) == "{ \"hello\", \"world\" }" )
|
||||
with expansion:
|
||||
"{ "hello", "world" }"
|
||||
==
|
||||
"{ "hello", "world" }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
vector<int,allocator> -> toString
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringVector.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(vv) == "{ }" )
|
||||
with expansion:
|
||||
"{ }" == "{ }"
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(vv) == "{ 42 }" )
|
||||
with expansion:
|
||||
"{ 42 }" == "{ 42 }"
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(vv) == "{ 42, 512 }" )
|
||||
with expansion:
|
||||
"{ 42, 512 }" == "{ 42, 512 }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
vec<vec<string,alloc>> -> toString
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringVector.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(v) == "{ }" )
|
||||
with expansion:
|
||||
"{ }" == "{ }"
|
||||
|
||||
ToStringVector.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Catch::toString(v) == "{ { \"hello\" }, { \"world\" } }" )
|
||||
with expansion:
|
||||
"{ { "hello" }, { "world" } }"
|
||||
==
|
||||
"{ { "hello" }, { "world" } }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parse test names and tags
|
||||
Empty test spec should have no filters
|
||||
@@ -6932,6 +7409,96 @@ PASSED:
|
||||
with expansion:
|
||||
true == true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ }" == Catch::toString(type{}) )
|
||||
with expansion:
|
||||
"{ }" == "{ }"
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ }" == Catch::toString(value) )
|
||||
with expansion:
|
||||
"{ }" == "{ }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<int>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ 0 }" == Catch::toString(type{0}) )
|
||||
with expansion:
|
||||
"{ 0 }" == "{ 0 }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<float,int>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "1.2f" == Catch::toString(float(1.2)) )
|
||||
with expansion:
|
||||
"1.2f" == "1.2f"
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ 1.2f, 0 }" == Catch::toString(type{1.2,0}) )
|
||||
with expansion:
|
||||
"{ 1.2f, 0 }" == "{ 1.2f, 0 }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<string,string>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ \"hello\", \"world\" }" == Catch::toString(type{"hello","world"}) )
|
||||
with expansion:
|
||||
"{ "hello", "world" }"
|
||||
==
|
||||
"{ "hello", "world" }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<tuple<int>,tuple<>,float>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ { 42 }, { }, 1.2f }" == Catch::toString(value) )
|
||||
with expansion:
|
||||
"{ { 42 }, { }, 1.2f }"
|
||||
==
|
||||
"{ { 42 }, { }, 1.2f }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
tuple<nullptr,int,const char *>
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringTuple.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringTuple.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( "{ nullptr, 42, \"Catch me\" }" == Catch::toString(value) )
|
||||
with expansion:
|
||||
"{ nullptr, 42, "Catch me" }"
|
||||
==
|
||||
"{ nullptr, 42, "Catch me" }"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Tag alias can be registered against tag patterns
|
||||
The same tag alias can only be registered once
|
||||
@@ -7375,6 +7942,6 @@ with expansion:
|
||||
true
|
||||
|
||||
===============================================================================
|
||||
test cases: 130 | 75 passed | 54 failed | 1 failed as expected
|
||||
assertions: 729 | 617 passed | 99 failed | 13 failed as expected
|
||||
test cases: 155 | 100 passed | 54 failed | 1 failed as expected
|
||||
assertions: 785 | 673 passed | 99 failed | 13 failed as expected
|
||||
|
||||
|
@@ -1,8 +1,88 @@
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
CatchSelfTest is a <version> host application.
|
||||
CatchSelfTest is a <version> (develop) host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString(enum)
|
||||
-------------------------------------------------------------------------------
|
||||
EnumToString.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e0) == "0" )
|
||||
with expansion:
|
||||
"0" == "0"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e1) == "1" )
|
||||
with expansion:
|
||||
"1" == "1"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString(enum w/operator<<)
|
||||
-------------------------------------------------------------------------------
|
||||
EnumToString.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e0) == "E2{0}" )
|
||||
with expansion:
|
||||
"E2{0}" == "E2{0}"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e1) == "E2{1}" )
|
||||
with expansion:
|
||||
"E2{1}" == "E2{1}"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString(enum class)
|
||||
-------------------------------------------------------------------------------
|
||||
EnumToString.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e0) == "0" )
|
||||
with expansion:
|
||||
"0" == "0"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e1) == "1" )
|
||||
with expansion:
|
||||
"1" == "1"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
toString(enum class w/operator<<)
|
||||
-------------------------------------------------------------------------------
|
||||
EnumToString.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e0) == "E2/V0" )
|
||||
with expansion:
|
||||
"E2/V0" == "E2/V0"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e1) == "E2/V1" )
|
||||
with expansion:
|
||||
"E2/V1" == "E2/V1"
|
||||
|
||||
EnumToString.cpp:<line number>:
|
||||
PASSED:
|
||||
CHECK( Catch::toString(e3) == "Unknown enum value 10" )
|
||||
with expansion:
|
||||
"Unknown enum value 10"
|
||||
==
|
||||
"Unknown enum value 10"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Some simple comparisons between doubles
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -406,6 +486,6 @@ with expansion:
|
||||
9.1f != Approx( 9.1000003815 )
|
||||
|
||||
===============================================================================
|
||||
test cases: 15 | 11 passed | 3 failed | 1 failed as expected
|
||||
assertions: 53 | 47 passed | 4 failed | 2 failed as expected
|
||||
test cases: 19 | 15 passed | 3 failed | 1 failed as expected
|
||||
assertions: 62 | 56 passed | 4 failed | 2 failed as expected
|
||||
|
||||
|
@@ -1,5 +1,9 @@
|
||||
<testsuites>
|
||||
<testsuite name="all tests" errors="12" failures="87" tests="729" hostname="tbd" time="{duration}" timestamp="tbd">
|
||||
<testsuite name="all tests" errors="12" failures="87" tests="785" hostname="tbd" time="{duration}" timestamp="tbd">
|
||||
<testcase classname="global" name="toString(enum)" time="{duration}"/>
|
||||
<testcase classname="global" name="toString(enum w/operator<<)" time="{duration}"/>
|
||||
<testcase classname="global" name="toString(enum class)" time="{duration}"/>
|
||||
<testcase classname="global" name="toString(enum class w/operator<<)" time="{duration}"/>
|
||||
<testcase classname="global" name="Some simple comparisons between doubles" time="{duration}"/>
|
||||
<testcase classname="global" name="Approximate comparisons with different epsilons" time="{duration}"/>
|
||||
<testcase classname="global" name="Approximate comparisons with floats" time="{duration}"/>
|
||||
@@ -469,6 +473,8 @@ MiscTests.cpp:<line number>
|
||||
<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="Process can be configured on command line" name="force-colour/--force-colour" time="{duration}"/>
|
||||
<testcase classname="Process can be configured on command line" name="force-colour/without --force-colour" 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}"/>
|
||||
@@ -481,6 +487,13 @@ 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="replaceInPlace" name="escape '" time="{duration}"/>
|
||||
<testcase classname="global" name="Strings can be rendered with colour" time="{duration}">
|
||||
<system-out>
|
||||
hello
|
||||
@@ -490,9 +503,9 @@ hello
|
||||
<testcase classname="global" name="Text can be formatted using the Text class" time="{duration}"/>
|
||||
<testcase classname="global" name="Long text is truncted" time="{duration}"/>
|
||||
<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="Where there is more to the expression after the RHS" time="{duration}"/>
|
||||
<testcase classname="global" name="Where the LHS is not a simple value" 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>
|
||||
@@ -500,7 +513,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=""first" == "second"" type="REQUIRE">
|
||||
TrickyTests.cpp:<line number>
|
||||
</failure>
|
||||
@@ -529,6 +542,20 @@ TrickyTests.cpp:<line number>
|
||||
<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="toString( has_toString )" time="{duration}"/>
|
||||
<testcase classname="global" name="toString( has_maker )" time="{duration}"/>
|
||||
<testcase classname="global" name="toString( has_maker_and_toString )" time="{duration}"/>
|
||||
<testcase classname="global" name="toString( vectors<has_toString )" time="{duration}"/>
|
||||
<testcase classname="global" name="toString( vectors<has_maker )" time="{duration}"/>
|
||||
<testcase classname="global" name="toString( vectors<has_maker_and_toString )" time="{duration}"/>
|
||||
<testcase classname="global" name="std::pair<int,std::string> -> toString" time="{duration}"/>
|
||||
<testcase classname="global" name="std::pair<int,const std::string> -> toString" time="{duration}"/>
|
||||
<testcase classname="global" name="std::vector<std::pair<std::string,int> > -> toString" time="{duration}"/>
|
||||
<testcase classname="global" name="pair<pair<int,const char *,pair<std::string,int> > -> toString" time="{duration}"/>
|
||||
<testcase classname="global" name="vector<int> -> toString" time="{duration}"/>
|
||||
<testcase classname="global" name="vector<string> -> toString" time="{duration}"/>
|
||||
<testcase classname="global" name="vector<int,allocator> -> toString" time="{duration}"/>
|
||||
<testcase classname="global" name="vec<vec<string,alloc>> -> toString" time="{duration}"/>
|
||||
<testcase classname="Parse test names and tags" name="Empty test spec should have no filters" time="{duration}"/>
|
||||
<testcase classname="Parse test names and tags" name="Test spec from empty string should have no filters" time="{duration}"/>
|
||||
<testcase classname="Parse test names and tags" name="Test spec from just a comma should have no filters" time="{duration}"/>
|
||||
@@ -560,6 +587,12 @@ TrickyTests.cpp:<line number>
|
||||
<testcase classname="Parse test names and tags" name="empty tag" time="{duration}"/>
|
||||
<testcase classname="Parse test names and tags" name="empty quoted name" time="{duration}"/>
|
||||
<testcase classname="Parse test names and tags" name="quoted string followed by tag exclusion" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<int>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<float,int>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<string,string>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<tuple<int>,tuple<>,float>" time="{duration}"/>
|
||||
<testcase classname="global" name="tuple<nullptr,int,const char *>" time="{duration}"/>
|
||||
<testcase classname="Tag alias can be registered against tag patterns" name="The same tag alias can only be registered once" time="{duration}"/>
|
||||
<testcase classname="Tag alias can be registered against tag patterns" name="Tag aliases must be of the form [@name]" time="{duration}"/>
|
||||
<testcase classname="global" name="Anonymous test case 1" time="{duration}"/>
|
||||
|
File diff suppressed because it is too large
Load Diff
76
projects/SelfTest/EnumToString.cpp
Normal file
76
projects/SelfTest/EnumToString.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
#include "catch.hpp"
|
||||
|
||||
/*
|
||||
TODO: maybe ought to check that user-provided specialisations of
|
||||
Catch::toString also do the right thing
|
||||
*/
|
||||
|
||||
// Enum without user-provided stream operator
|
||||
enum Enum1 { Enum1Value0, Enum1Value1 };
|
||||
|
||||
TEST_CASE( "toString(enum)", "[toString][enum]" ) {
|
||||
Enum1 e0 = Enum1Value0;
|
||||
CHECK( Catch::toString(e0) == "0" );
|
||||
Enum1 e1 = Enum1Value1;
|
||||
CHECK( Catch::toString(e1) == "1" );
|
||||
}
|
||||
|
||||
// Enum with user-provided stream operator
|
||||
enum Enum2 { Enum2Value0, Enum2Value1 };
|
||||
|
||||
inline std::ostream& operator<<( std::ostream& os, Enum2 v ) {
|
||||
return os << "E2{" << static_cast<int>(v) << "}";
|
||||
}
|
||||
|
||||
TEST_CASE( "toString(enum w/operator<<)", "[toString][enum]" ) {
|
||||
Enum2 e0 = Enum2Value0;
|
||||
CHECK( Catch::toString(e0) == "E2{0}" );
|
||||
Enum2 e1 = Enum2Value1;
|
||||
CHECK( Catch::toString(e1) == "E2{1}" );
|
||||
}
|
||||
|
||||
#if defined(CATCH_CPP11_OR_GREATER)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
#endif
|
||||
|
||||
// Enum class without user-provided stream operator
|
||||
enum class EnumClass1 { EnumClass1Value0, EnumClass1Value1 };
|
||||
|
||||
TEST_CASE( "toString(enum class)", "[toString][enum][enumClass]" ) {
|
||||
EnumClass1 e0 = EnumClass1::EnumClass1Value0;
|
||||
CHECK( Catch::toString(e0) == "0" );
|
||||
EnumClass1 e1 = EnumClass1::EnumClass1Value1;
|
||||
CHECK( Catch::toString(e1) == "1" );
|
||||
}
|
||||
|
||||
// Enum class with user-provided stream operator
|
||||
enum class EnumClass2 : short { EnumClass2Value0, EnumClass2Value1 };
|
||||
|
||||
inline std::ostream& operator<<( std::ostream& os, EnumClass2 e2 ) {
|
||||
switch( static_cast<int>( e2 ) ) {
|
||||
case static_cast<int>( EnumClass2::EnumClass2Value0 ):
|
||||
return os << "E2/V0";
|
||||
case static_cast<int>( EnumClass2::EnumClass2Value1 ):
|
||||
return os << "E2/V1";
|
||||
default:
|
||||
return os << "Unknown enum value " << static_cast<int>( e2 );
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE( "toString(enum class w/operator<<)", "[toString][enum][enumClass]" ) {
|
||||
EnumClass2 e0 = EnumClass2::EnumClass2Value0;
|
||||
CHECK( Catch::toString(e0) == "E2/V0" );
|
||||
EnumClass2 e1 = EnumClass2::EnumClass2Value1;
|
||||
CHECK( Catch::toString(e1) == "E2/V1" );
|
||||
|
||||
EnumClass2 e3 = static_cast<EnumClass2>(10);
|
||||
CHECK( Catch::toString(e3) == "Unknown enum value 10" );
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#endif // CATCH_CPP11_OR_GREATER
|
||||
|
@@ -380,3 +380,9 @@ TEST_CASE( "toString on wchar_t returns the string contents", "[toString]" ) {
|
||||
std::string result = Catch::toString( s );
|
||||
CHECK( result == "\"wide load\"" );
|
||||
}
|
||||
|
||||
//TEST_CASE( "Divide by Zero signal handler", "[.][sig]" ) {
|
||||
// int i = 0;
|
||||
// int x = 10/i; // This should cause the signal to fire
|
||||
// CHECK( x == 0 );
|
||||
//}
|
||||
|
@@ -8,6 +8,7 @@
|
||||
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch.hpp"
|
||||
#include "reporters/catch_reporter_teamcity.hpp"
|
||||
|
||||
// Some example tag aliases
|
||||
CATCH_REGISTER_TAG_ALIAS( "[@nhf]", "[failing]~[.]" )
|
||||
@@ -181,7 +182,23 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
|
||||
CHECK( config.shouldDebugBreak );
|
||||
CHECK( config.noThrow == true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SECTION( "force-colour", "") {
|
||||
SECTION( "--force-colour", "" ) {
|
||||
const char* argv[] = { "test", "--force-colour" };
|
||||
CHECK_NOTHROW( parseIntoConfig( argv, config ) );
|
||||
|
||||
REQUIRE( config.forceColour );
|
||||
}
|
||||
|
||||
SECTION( "without --force-colour", "" ) {
|
||||
const char* argv[] = { "test" };
|
||||
CHECK_NOTHROW( parseIntoConfig( argv, config ) );
|
||||
|
||||
REQUIRE( !config.forceColour );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -347,22 +364,55 @@ private:
|
||||
std::vector<ColourIndex> colours;
|
||||
};
|
||||
|
||||
TEST_CASE( "replaceInPlace", "" ) {
|
||||
std::string letters = "abcdefcg";
|
||||
SECTION( "replace single char" ) {
|
||||
CHECK( replaceInPlace( letters, "b", "z" ) );
|
||||
CHECK( letters == "azcdefcg" );
|
||||
}
|
||||
SECTION( "replace two chars" ) {
|
||||
CHECK( replaceInPlace( letters, "c", "z" ) );
|
||||
CHECK( letters == "abzdefzg" );
|
||||
}
|
||||
SECTION( "replace first char" ) {
|
||||
CHECK( replaceInPlace( letters, "a", "z" ) );
|
||||
CHECK( letters == "zbcdefcg" );
|
||||
}
|
||||
SECTION( "replace last char" ) {
|
||||
CHECK( replaceInPlace( letters, "g", "z" ) );
|
||||
CHECK( letters == "abcdefcz" );
|
||||
}
|
||||
SECTION( "replace all chars" ) {
|
||||
CHECK( replaceInPlace( letters, letters, "replaced" ) );
|
||||
CHECK( letters == "replaced" );
|
||||
}
|
||||
SECTION( "replace no chars" ) {
|
||||
CHECK_FALSE( replaceInPlace( letters, "x", "z" ) );
|
||||
CHECK( letters == letters );
|
||||
}
|
||||
SECTION( "escape '" ) {
|
||||
std::string s = "didn't";
|
||||
CHECK( replaceInPlace( s, "'", "|'" ) );
|
||||
CHECK( s == "didn|'t" );
|
||||
}
|
||||
}
|
||||
|
||||
// !TBD: This will be folded into Text class
|
||||
TEST_CASE( "Strings can be rendered with colour", "[colour][.]" ) {
|
||||
TEST_CASE( "Strings can be rendered with colour", "[.colour]" ) {
|
||||
|
||||
{
|
||||
ColourString cs( "hello" );
|
||||
cs .addColour( Colour::Red, 0 )
|
||||
.addColour( Colour::Green, -1 );
|
||||
|
||||
std::cout << cs << std::endl;
|
||||
Catch::cout() << cs << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
ColourString cs( "hello" );
|
||||
cs .addColour( Colour::Blue, 1, -2 );
|
||||
|
||||
std::cout << cs << std::endl;
|
||||
Catch::cout() << cs << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
47
projects/SelfTest/ToStringPair.cpp
Normal file
47
projects/SelfTest/ToStringPair.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
#include "catch.hpp"
|
||||
|
||||
// === Pair ===
|
||||
namespace Catch {
|
||||
// Note: If we put this in the right place in catch_tostring, then
|
||||
// we can make it an overload of Catch::toString
|
||||
template<typename T1, typename T2>
|
||||
struct StringMaker<std::pair<T1,T2> > {
|
||||
static std::string convert( const std::pair<T1,T2>& pair ) {
|
||||
std::ostringstream oss;
|
||||
oss << "{ "
|
||||
<< toString( pair.first )
|
||||
<< ", "
|
||||
<< toString( pair.second )
|
||||
<< " }";
|
||||
return oss.str();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
TEST_CASE( "std::pair<int,std::string> -> toString", "[toString][pair]" ) {
|
||||
std::pair<int,std::string> value( 34, "xyzzy" );
|
||||
REQUIRE( Catch::toString( value ) == "{ 34, \"xyzzy\" }" );
|
||||
}
|
||||
|
||||
TEST_CASE( "std::pair<int,const std::string> -> toString", "[toString][pair]" ) {
|
||||
std::pair<int,const std::string> value( 34, "xyzzy" );
|
||||
REQUIRE( Catch::toString(value) == "{ 34, \"xyzzy\" }" );
|
||||
}
|
||||
|
||||
TEST_CASE( "std::vector<std::pair<std::string,int> > -> toString", "[toString][pair]" ) {
|
||||
std::vector<std::pair<std::string,int> > pr;
|
||||
pr.push_back( std::make_pair("green", 55 ) );
|
||||
REQUIRE( Catch::toString( pr ) == "{ { \"green\", 55 } }" );
|
||||
}
|
||||
|
||||
// This is pretty contrived - I figure if this works, anything will...
|
||||
TEST_CASE( "pair<pair<int,const char *,pair<std::string,int> > -> toString", "[toString][pair]" ) {
|
||||
typedef std::pair<int,const char *> left_t;
|
||||
typedef std::pair<std::string,int> right_t;
|
||||
|
||||
left_t left( 42, "Arthur" );
|
||||
right_t right( "Ford", 24 );
|
||||
|
||||
std::pair<left_t,right_t> pair( left, right );
|
||||
REQUIRE( Catch::toString( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" );
|
||||
}
|
48
projects/SelfTest/ToStringTuple.cpp
Normal file
48
projects/SelfTest/ToStringTuple.cpp
Normal file
@@ -0,0 +1,48 @@
|
||||
#include "catch.hpp"
|
||||
|
||||
#ifdef CATCH_CPP11_OR_GREATER
|
||||
|
||||
TEST_CASE( "tuple<>", "[toString][tuple]" )
|
||||
{
|
||||
typedef std::tuple<> type;
|
||||
CHECK( "{ }" == Catch::toString(type{}) );
|
||||
type value {};
|
||||
CHECK( "{ }" == Catch::toString(value) );
|
||||
}
|
||||
|
||||
TEST_CASE( "tuple<int>", "[toString][tuple]" )
|
||||
{
|
||||
typedef std::tuple<int> type;
|
||||
CHECK( "{ 0 }" == Catch::toString(type{0}) );
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE( "tuple<float,int>", "[toString][tuple]" )
|
||||
{
|
||||
typedef std::tuple<float,int> type;
|
||||
CHECK( "1.2f" == Catch::toString(float(1.2)) );
|
||||
CHECK( "{ 1.2f, 0 }" == Catch::toString(type{1.2,0}) );
|
||||
}
|
||||
|
||||
TEST_CASE( "tuple<string,string>", "[toString][tuple]" )
|
||||
{
|
||||
typedef std::tuple<std::string,std::string> type;
|
||||
CHECK( "{ \"hello\", \"world\" }" == Catch::toString(type{"hello","world"}) );
|
||||
}
|
||||
|
||||
TEST_CASE( "tuple<tuple<int>,tuple<>,float>", "[toString][tuple]" )
|
||||
{
|
||||
typedef std::tuple<std::tuple<int>,std::tuple<>,float> type;
|
||||
type value { std::tuple<int>{42}, {}, 1.2f };
|
||||
CHECK( "{ { 42 }, { }, 1.2f }" == Catch::toString(value) );
|
||||
}
|
||||
|
||||
TEST_CASE( "tuple<nullptr,int,const char *>", "[toString][tuple]" )
|
||||
{
|
||||
typedef std::tuple<std::nullptr_t,int,const char *> type;
|
||||
type value { nullptr, 42, "Catch me" };
|
||||
CHECK( "{ nullptr, 42, \"Catch me\" }" == Catch::toString(value) );
|
||||
}
|
||||
|
||||
#endif /* #ifdef CATCH_CPP11_OR_GREATER */
|
||||
|
77
projects/SelfTest/ToStringVector.cpp
Normal file
77
projects/SelfTest/ToStringVector.cpp
Normal file
@@ -0,0 +1,77 @@
|
||||
#include "catch.hpp"
|
||||
#include <vector>
|
||||
|
||||
|
||||
// vedctor
|
||||
TEST_CASE( "vector<int> -> toString", "[toString][vector]" )
|
||||
{
|
||||
std::vector<int> vv;
|
||||
REQUIRE( Catch::toString(vv) == "{ }" );
|
||||
vv.push_back( 42 );
|
||||
REQUIRE( Catch::toString(vv) == "{ 42 }" );
|
||||
vv.push_back( 512 );
|
||||
REQUIRE( Catch::toString(vv) == "{ 42, 512 }" );
|
||||
}
|
||||
|
||||
TEST_CASE( "vector<string> -> toString", "[toString][vector]" )
|
||||
{
|
||||
std::vector<std::string> vv;
|
||||
REQUIRE( Catch::toString(vv) == "{ }" );
|
||||
vv.push_back( "hello" );
|
||||
REQUIRE( Catch::toString(vv) == "{ \"hello\" }" );
|
||||
vv.push_back( "world" );
|
||||
REQUIRE( Catch::toString(vv) == "{ \"hello\", \"world\" }" );
|
||||
}
|
||||
|
||||
#if defined(CATCH_CPP11_OR_GREATER)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
#endif
|
||||
|
||||
/*
|
||||
Note: These tests *can* be made to work with C++ < 11, but the
|
||||
allocator is a lot more work...
|
||||
*/
|
||||
namespace {
|
||||
/* Minimal Allocator */
|
||||
template<typename T>
|
||||
struct minimal_allocator {
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
T *allocate( size_type n ) {
|
||||
return static_cast<T *>( ::operator new( n * sizeof(T) ) );
|
||||
}
|
||||
void deallocate( T *p, size_type /*n*/ ) {
|
||||
::operator delete( static_cast<void *>(p) );
|
||||
}
|
||||
template<typename U>
|
||||
bool operator==( const minimal_allocator<U>& ) const { return true; }
|
||||
template<typename U>
|
||||
bool operator!=( const minimal_allocator<U>& ) const { return false; }
|
||||
};
|
||||
}
|
||||
|
||||
TEST_CASE( "vector<int,allocator> -> toString", "[toString][vector,allocator]" ) {
|
||||
std::vector<int,minimal_allocator<int> > vv;
|
||||
REQUIRE( Catch::toString(vv) == "{ }" );
|
||||
vv.push_back( 42 );
|
||||
REQUIRE( Catch::toString(vv) == "{ 42 }" );
|
||||
vv.push_back( 512 );
|
||||
REQUIRE( Catch::toString(vv) == "{ 42, 512 }" );
|
||||
}
|
||||
|
||||
TEST_CASE( "vec<vec<string,alloc>> -> toString", "[toString][vector,allocator]" ) {
|
||||
typedef std::vector<std::string,minimal_allocator<std::string> > inner;
|
||||
typedef std::vector<inner> vector;
|
||||
vector v;
|
||||
REQUIRE( Catch::toString(v) == "{ }" );
|
||||
v.push_back( inner { "hello" } );
|
||||
v.push_back( inner { "world" } );
|
||||
REQUIRE( Catch::toString(v) == "{ { \"hello\" }, { \"world\" } }" );
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#endif // CATCH_CPP11_OR_GREATER
|
68
projects/SelfTest/ToStringWhich.cpp
Normal file
68
projects/SelfTest/ToStringWhich.cpp
Normal file
@@ -0,0 +1,68 @@
|
||||
#include "catch.hpp"
|
||||
/*
|
||||
Demonstrate which version of toString/StringMaker is being used
|
||||
for various types
|
||||
*/
|
||||
|
||||
|
||||
struct has_toString { };
|
||||
struct has_maker {};
|
||||
struct has_maker_and_toString {};
|
||||
|
||||
namespace Catch {
|
||||
inline std::string toString( const has_toString& ) {
|
||||
return "toString( has_toString )";
|
||||
}
|
||||
inline std::string toString( const has_maker_and_toString& ) {
|
||||
return "toString( has_maker_and_toString )";
|
||||
}
|
||||
template<>
|
||||
struct StringMaker<has_maker> {
|
||||
static std::string convert( const has_maker& ) {
|
||||
return "StringMaker<has_maker>";
|
||||
}
|
||||
};
|
||||
template<>
|
||||
struct StringMaker<has_maker_and_toString> {
|
||||
static std::string convert( const has_maker_and_toString& ) {
|
||||
return "StringMaker<has_maker_and_toString>";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Call the overload
|
||||
TEST_CASE( "toString( has_toString )", "[toString]" ) {
|
||||
has_toString item;
|
||||
REQUIRE( Catch::toString( item ) == "toString( has_toString )" );
|
||||
}
|
||||
|
||||
// Call the overload
|
||||
TEST_CASE( "toString( has_maker )", "[toString]" ) {
|
||||
has_maker item;
|
||||
REQUIRE( Catch::toString( item ) == "StringMaker<has_maker>" );
|
||||
}
|
||||
|
||||
// Call the overload
|
||||
TEST_CASE( "toString( has_maker_and_toString )", "[toString]" ) {
|
||||
has_maker_and_toString item;
|
||||
REQUIRE( Catch::toString( item ) == "toString( has_maker_and_toString )" );
|
||||
}
|
||||
|
||||
// Vectors...
|
||||
TEST_CASE( "toString( vectors<has_toString )", "[toString]" ) {
|
||||
std::vector<has_toString> v(1);
|
||||
// This invokes template<T> toString which actually gives us '{ ? }'
|
||||
REQUIRE( Catch::toString( v ) == "{ {?} }" );
|
||||
}
|
||||
|
||||
TEST_CASE( "toString( vectors<has_maker )", "[toString]" ) {
|
||||
std::vector<has_maker> v(1);
|
||||
REQUIRE( Catch::toString( v ) == "{ StringMaker<has_maker> }" );
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE( "toString( vectors<has_maker_and_toString )", "[toString]" ) {
|
||||
std::vector<has_maker_and_toString> v(1);
|
||||
// Note: This invokes the template<T> toString -> StringMaker
|
||||
REQUIRE( Catch::toString( v ) == "{ StringMaker<has_maker_and_toString> }" );
|
||||
}
|
@@ -44,7 +44,7 @@ TEST_CASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
TEST_CASE
|
||||
(
|
||||
"Where the is more to the expression after the RHS[failing]",
|
||||
"Where there is more to the expression after the RHS",
|
||||
"[Tricky][failing][.]"
|
||||
)
|
||||
{
|
||||
@@ -55,7 +55,7 @@ TEST_CASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
TEST_CASE
|
||||
(
|
||||
"Where the LHS is not a simple value[failing]",
|
||||
"Where the LHS is not a simple value",
|
||||
"[Tricky][failing][.]"
|
||||
)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ struct Opaque
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
TEST_CASE
|
||||
(
|
||||
"A failing expression with a non streamable type is still captured[failing]",
|
||||
"A failing expression with a non streamable type is still captured",
|
||||
"[Tricky][failing][.]"
|
||||
)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ TEST_CASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
TEST_CASE
|
||||
(
|
||||
"string literals of different sizes can be compared[failing]",
|
||||
"string literals of different sizes can be compared",
|
||||
"[Tricky][failing][.]"
|
||||
)
|
||||
{
|
||||
|
@@ -1,14 +1,30 @@
|
||||
SOURCES = ApproxTests.cpp \
|
||||
ClassTests.cpp \
|
||||
ConditionTests.cpp \
|
||||
ExceptionTests.cpp \
|
||||
GeneratorTests.cpp \
|
||||
MessageTests.cpp \
|
||||
MiscTests.cpp \
|
||||
TestMain.cpp \
|
||||
TrickyTests.cpp \
|
||||
BDDTests.cpp \
|
||||
VariadicMacrosTests.cpp \
|
||||
EnumToString.cpp \
|
||||
ToStringPair.cpp \
|
||||
ToStringVector.cpp \
|
||||
ToStringWhich.cpp
|
||||
|
||||
EXEC=CatchSelfTest
|
||||
SOURCES = $(wildcard *.cpp)
|
||||
OBJECTS = $(SOURCES:.cpp=.o)
|
||||
|
||||
OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES))
|
||||
CXX = g++
|
||||
CXXFLAGS = -I../../include -I../../include/internal
|
||||
CXXFLAGS = -I../../include -std=c++11
|
||||
|
||||
$(EXEC): $(OBJECTS)
|
||||
CatchSelfTest: $(OBJECTS)
|
||||
$(CXX) -o $@ $^
|
||||
|
||||
test: CatchSelfTest
|
||||
./CatchSelfTest
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJECTS)
|
||||
$(RM) $(EXEC)
|
||||
rm -f $(OBJECTS) CatchSelfTest
|
||||
|
||||
|
@@ -7,11 +7,16 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
263F7A4719B6FCBF009474C2 /* EnumToString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263F7A4619B6FCBF009474C2 /* EnumToString.cpp */; };
|
||||
263F7A4B19B6FE1E009474C2 /* ToStringPair.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263F7A4819B6FE1E009474C2 /* ToStringPair.cpp */; };
|
||||
263F7A4C19B6FE1E009474C2 /* ToStringVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263F7A4919B6FE1E009474C2 /* ToStringVector.cpp */; };
|
||||
263F7A4D19B6FE1E009474C2 /* ToStringWhich.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263F7A4A19B6FE1E009474C2 /* ToStringWhich.cpp */; };
|
||||
2656C2211925E7330040DB02 /* catch_test_spec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2656C2201925E7330040DB02 /* catch_test_spec.cpp */; };
|
||||
266B06B816F3A60A004ED264 /* VariadicMacrosTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266B06B616F3A60A004ED264 /* VariadicMacrosTests.cpp */; };
|
||||
266ECD74170F3C620030D735 /* BDDTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266ECD73170F3C620030D735 /* BDDTests.cpp */; };
|
||||
26711C8F195D465C0033EDA2 /* TagAliasTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26711C8D195D465C0033EDA2 /* TagAliasTests.cpp */; };
|
||||
26847E5F16BBADB40043B9C1 /* catch_message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26847E5D16BBADB40043B9C1 /* catch_message.cpp */; };
|
||||
2691574C1A532A280054F1ED /* ToStringTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2691574B1A532A280054F1ED /* ToStringTuple.cpp */; };
|
||||
26948286179A9AB900ED166E /* SectionTrackerTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26948284179A9AB900ED166E /* SectionTrackerTests.cpp */; };
|
||||
2694A1FD16A0000E004816E3 /* catch_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2694A1FB16A0000E004816E3 /* catch_text.cpp */; };
|
||||
26E1B7D319213BC900812682 /* CmdLineTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E1B7D119213BC900812682 /* CmdLineTests.cpp */; };
|
||||
@@ -66,6 +71,11 @@
|
||||
2627F7061935B55F009BCE2D /* catch_result_builder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_result_builder.hpp; sourceTree = "<group>"; };
|
||||
262E7399184673A800CAC268 /* catch_reporter_bases.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_bases.hpp; sourceTree = "<group>"; };
|
||||
262E739A1846759000CAC268 /* catch_common.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_common.hpp; sourceTree = "<group>"; };
|
||||
263F7A4519A66608009474C2 /* catch_fatal_condition.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_fatal_condition.hpp; sourceTree = "<group>"; };
|
||||
263F7A4619B6FCBF009474C2 /* EnumToString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EnumToString.cpp; path = ../../../SelfTest/EnumToString.cpp; sourceTree = "<group>"; };
|
||||
263F7A4819B6FE1E009474C2 /* ToStringPair.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToStringPair.cpp; path = ../../../SelfTest/ToStringPair.cpp; sourceTree = "<group>"; };
|
||||
263F7A4919B6FE1E009474C2 /* ToStringVector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToStringVector.cpp; path = ../../../SelfTest/ToStringVector.cpp; sourceTree = "<group>"; };
|
||||
263F7A4A19B6FE1E009474C2 /* ToStringWhich.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToStringWhich.cpp; path = ../../../SelfTest/ToStringWhich.cpp; sourceTree = "<group>"; };
|
||||
263FD06017AF8DF200988A20 /* catch_timer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_timer.hpp; sourceTree = "<group>"; };
|
||||
263FD06117AF8DF200988A20 /* catch_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_timer.h; sourceTree = "<group>"; };
|
||||
2656C21F1925E5100040DB02 /* catch_test_spec_parser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_test_spec_parser.hpp; sourceTree = "<group>"; };
|
||||
@@ -87,6 +97,8 @@
|
||||
26847E5C16BBACB60043B9C1 /* catch_message.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_message.hpp; sourceTree = "<group>"; };
|
||||
26847E5D16BBADB40043B9C1 /* catch_message.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_message.cpp; path = ../../../SelfTest/SurrogateCpps/catch_message.cpp; sourceTree = "<group>"; };
|
||||
268F47B018A93F7800D8C14F /* catch_clara.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_clara.h; sourceTree = "<group>"; };
|
||||
2691574A1A4480C50054F1ED /* catch_reporter_teamcity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_teamcity.hpp; sourceTree = "<group>"; };
|
||||
2691574B1A532A280054F1ED /* ToStringTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToStringTuple.cpp; path = ../../../SelfTest/ToStringTuple.cpp; sourceTree = "<group>"; };
|
||||
26926E8318D7777D004E10F2 /* clara.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = clara.h; path = ../../../../include/external/clara.h; sourceTree = "<group>"; };
|
||||
26926E8418D77809004E10F2 /* tbc_text_format.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tbc_text_format.h; path = ../../../../include/external/tbc_text_format.h; sourceTree = "<group>"; };
|
||||
26948284179A9AB900ED166E /* SectionTrackerTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SectionTrackerTests.cpp; path = ../../../SelfTest/SectionTrackerTests.cpp; sourceTree = "<group>"; };
|
||||
@@ -246,6 +258,11 @@
|
||||
4A6D0C40149B3DAB00DB3EAA /* Tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2691574B1A532A280054F1ED /* ToStringTuple.cpp */,
|
||||
263F7A4819B6FE1E009474C2 /* ToStringPair.cpp */,
|
||||
263F7A4919B6FE1E009474C2 /* ToStringVector.cpp */,
|
||||
263F7A4A19B6FE1E009474C2 /* ToStringWhich.cpp */,
|
||||
263F7A4619B6FCBF009474C2 /* EnumToString.cpp */,
|
||||
266ECD73170F3C620030D735 /* BDDTests.cpp */,
|
||||
4A6D0C36149B3D9E00DB3EAA /* TrickyTests.cpp */,
|
||||
4A6D0C2D149B3D9E00DB3EAA /* ApproxTests.cpp */,
|
||||
@@ -300,6 +317,7 @@
|
||||
4A6D0C67149B3E3D00DB3EAA /* catch_reporter_junit.hpp */,
|
||||
4A6D0C68149B3E3D00DB3EAA /* catch_reporter_xml.hpp */,
|
||||
4AB42F84166F3E1A0099F2C8 /* catch_reporter_console.hpp */,
|
||||
2691574A1A4480C50054F1ED /* catch_reporter_teamcity.hpp */,
|
||||
);
|
||||
name = reporters;
|
||||
path = ../../../../include/reporters;
|
||||
@@ -453,6 +471,7 @@
|
||||
268F47B018A93F7800D8C14F /* catch_clara.h */,
|
||||
2656C226192A77EF0040DB02 /* catch_suppress_warnings.h */,
|
||||
2656C227192A78410040DB02 /* catch_reenable_warnings.h */,
|
||||
263F7A4519A66608009474C2 /* catch_fatal_condition.hpp */,
|
||||
);
|
||||
name = Infrastructure;
|
||||
sourceTree = "<group>";
|
||||
@@ -492,7 +511,7 @@
|
||||
4A6D0C17149B3D3B00DB3EAA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0500;
|
||||
LastUpgradeCheck = 0600;
|
||||
};
|
||||
buildConfigurationList = 4A6D0C1A149B3D3B00DB3EAA /* Build configuration list for PBXProject "CatchSelfTest" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
@@ -516,6 +535,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
263F7A4719B6FCBF009474C2 /* EnumToString.cpp in Sources */,
|
||||
4A6D0C37149B3D9E00DB3EAA /* ApproxTests.cpp in Sources */,
|
||||
4A6D0C38149B3D9E00DB3EAA /* ClassTests.cpp in Sources */,
|
||||
4A6D0C39149B3D9E00DB3EAA /* ConditionTests.cpp in Sources */,
|
||||
@@ -525,7 +545,10 @@
|
||||
4A6D0C3D149B3D9E00DB3EAA /* MiscTests.cpp in Sources */,
|
||||
4A6D0C3E149B3D9E00DB3EAA /* TestMain.cpp in Sources */,
|
||||
4A6D0C3F149B3D9E00DB3EAA /* TrickyTests.cpp in Sources */,
|
||||
263F7A4D19B6FE1E009474C2 /* ToStringWhich.cpp in Sources */,
|
||||
263F7A4B19B6FE1E009474C2 /* ToStringPair.cpp in Sources */,
|
||||
4AEE032016142F910071E950 /* catch_common.cpp in Sources */,
|
||||
263F7A4C19B6FE1E009474C2 /* ToStringVector.cpp in Sources */,
|
||||
4AEE032316142FC70071E950 /* catch_debugger.cpp in Sources */,
|
||||
4AEE032516142FF10071E950 /* catch_stream.cpp in Sources */,
|
||||
4AEE0328161434FD0071E950 /* catch_xmlwriter.cpp in Sources */,
|
||||
@@ -538,6 +561,7 @@
|
||||
4A45DA2D16161FA2004F8D6B /* catch_interfaces_capture.cpp in Sources */,
|
||||
4A45DA3116161FFC004F8D6B /* catch_interfaces_reporter.cpp in Sources */,
|
||||
4A45DA3316162047004F8D6B /* catch_interfaces_exception.cpp in Sources */,
|
||||
2691574C1A532A280054F1ED /* ToStringTuple.cpp in Sources */,
|
||||
26711C8F195D465C0033EDA2 /* TagAliasTests.cpp in Sources */,
|
||||
4A45DA3516162071004F8D6B /* catch_interfaces_runner.cpp in Sources */,
|
||||
4AB3D99D1616216500C9A0F8 /* catch_interfaces_testcase.cpp in Sources */,
|
||||
@@ -564,9 +588,11 @@
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CLANG_WARN__EXIT_TIME_DESTRUCTORS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
@@ -613,10 +639,12 @@
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CLANG_WARN__EXIT_TIME_DESTRUCTORS = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
|
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>034502BF-F920-4DB6-82F5-71E61E50118C</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>CatchSelfTest</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>01DD8CA9-7DC3-46BC-B998-EFF40EA3485F</key>
|
||||
<string>ssh://github.com/philsquared/Catch.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.xcworkspace</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>01DD8CA9-7DC3-46BC-B998-EFF40EA3485F</key>
|
||||
<string>../../../../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>ssh://github.com/philsquared/Catch.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>110</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>01DD8CA9-7DC3-46BC-B998-EFF40EA3485F</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>01DD8CA9-7DC3-46BC-B998-EFF40EA3485F</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>Catch</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
Reference in New Issue
Block a user