mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Added nothrow command line option
Causes _THROWS family of macros to no evaluate expression
This commit is contained in:
@@ -75,6 +75,7 @@ TEST_CASE( "selftest/parser", "" ) {
|
||||
CHECK( config.shouldDebugBreak() == false );
|
||||
CHECK( config.showHelp() == false );
|
||||
CHECK( config.getCutoff() == -1 );
|
||||
CHECK( config.allowThrows() == true );
|
||||
CHECK( dynamic_cast<Catch::BasicReporter*>( config.getReporter().get() ) );
|
||||
}
|
||||
|
||||
@@ -225,14 +226,33 @@ TEST_CASE( "selftest/parser", "" ) {
|
||||
REQUIRE_THAT( config.getMessage(), Contains( "accepts" ) );
|
||||
}
|
||||
}
|
||||
SECTION( "combinations", "" ) {
|
||||
SECTION( "-a -b", "" ) {
|
||||
const char* argv[] = { "test", "-a", "-b" };
|
||||
|
||||
SECTION( "nothrow", "" ) {
|
||||
SECTION( "-nt", "" ) {
|
||||
const char* argv[] = { "test", "-nt" };
|
||||
Catch::Config config;
|
||||
CHECK( parseIntoConfig( argv, config ) );
|
||||
|
||||
REQUIRE( config.getCutoff() == 1 );
|
||||
REQUIRE( config.shouldDebugBreak() );
|
||||
REQUIRE( config.allowThrows() == false );
|
||||
}
|
||||
SECTION( "--nothrow", "" ) {
|
||||
const char* argv[] = { "test", "--nothrow" };
|
||||
Catch::Config config;
|
||||
CHECK( parseIntoConfig( argv, config ) );
|
||||
|
||||
REQUIRE( config.allowThrows() == false );
|
||||
}
|
||||
|
||||
}
|
||||
SECTION( "combinations", "" ) {
|
||||
SECTION( "-a -b", "" ) {
|
||||
const char* argv[] = { "test", "-a", "-b", "-nt" };
|
||||
Catch::Config config;
|
||||
CHECK( parseIntoConfig( argv, config ) );
|
||||
|
||||
CHECK( config.getCutoff() == 1 );
|
||||
CHECK( config.shouldDebugBreak() );
|
||||
CHECK( config.allowThrows() == false );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -95,6 +95,7 @@
|
||||
4AC91CCE155CF02800DC5117 /* catch_expression.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_expression.hpp; sourceTree = "<group>"; };
|
||||
4AC91CD0155D8DA600DC5117 /* catch_expression_builder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_expression_builder.hpp; sourceTree = "<group>"; };
|
||||
4AE1840A14EE4F230066340D /* catch_self_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_self_test.cpp; path = ../../../SelfTest/catch_self_test.cpp; sourceTree = "<group>"; };
|
||||
4AFC661D157E96A7009D58CF /* catch_interfaces_config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_config.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -264,6 +265,7 @@
|
||||
4A6D0C55149B3E3D00DB3EAA /* catch_interfaces_reporter.h */,
|
||||
4A6D0C56149B3E3D00DB3EAA /* catch_interfaces_runner.h */,
|
||||
4A6D0C57149B3E3D00DB3EAA /* catch_interfaces_testcase.h */,
|
||||
4AFC661D157E96A7009D58CF /* catch_interfaces_config.h */,
|
||||
);
|
||||
name = Interfaces;
|
||||
sourceTree = "<group>";
|
||||
|
Reference in New Issue
Block a user