mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-01 09:27:54 +00:00
Added StringMaker (for partially specialising string conversions), extended BDD macros and moved file/line info to top of message.
Re-enable ANSI colour by default - hopefully properly excluding Windows this time
This commit is contained in:
parent
ead139e094
commit
767f1588dc
14 changed files with 952 additions and 872 deletions
|
@ -580,7 +580,6 @@
|
|||
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++98";
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = CATCH_CONFIG_USE_ANSI_COLOUR_CODES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WARNING_CFLAGS = (
|
||||
|
@ -596,7 +595,6 @@
|
|||
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++98";
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = CATCH_CONFIG_USE_ANSI_COLOUR_CODES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WARNING_CFLAGS = (
|
||||
|
|
|
@ -14,11 +14,14 @@
|
|||
|
||||
// !TBD: story scenarios map to class based tests
|
||||
#define SCENARIO( name, tags ) TEST_CASE( "Scenario: " name, tags )
|
||||
#define GIVEN( desc ) SECTION( " Given: " desc, "" )
|
||||
#define WHEN( desc ) SECTION( " When: " desc, "" )
|
||||
#define THEN( desc ) SECTION( " Then: " desc, "" )
|
||||
#define GIVEN( desc ) SECTION( "Given: " desc, "" )
|
||||
#define WHEN( desc ) SECTION( " When: " desc, "" )
|
||||
#define AND_WHEN( desc ) SECTION( " And: " desc, "" )
|
||||
#define THEN( desc ) SECTION( " Then: " desc, "" )
|
||||
#define AND_THEN( desc ) SECTION( " And: " desc, "" )
|
||||
|
||||
inline bool itDoesThis(){ return true; }
|
||||
inline bool itDoesThat(){ return true; }
|
||||
|
||||
SCENARIO( "Do that thing with the thing", "[tags]" ) {
|
||||
GIVEN( "This stuff exists" ) {
|
||||
|
@ -26,7 +29,11 @@ SCENARIO( "Do that thing with the thing", "[tags]" ) {
|
|||
WHEN( "I do this" ) {
|
||||
// do this
|
||||
THEN( "it should do this")
|
||||
{
|
||||
REQUIRE( itDoesThis() );
|
||||
AND_THEN( "do that")
|
||||
REQUIRE( itDoesThat() );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue