mirror of
https://github.com/catchorg/Catch2.git
synced 2025-10-20 08:55:40 +02:00
Added nothrow command line option
Causes _THROWS family of macros to no evaluate expression
This commit is contained in:
@@ -174,6 +174,13 @@ namespace Catch {
|
||||
}
|
||||
config.setCutoff( threshold );
|
||||
}
|
||||
|
||||
if( Command cmd = parser.find( "-nt", "--nothrow" ) ) {
|
||||
if( cmd.argsCount() != 0 )
|
||||
cmd.raiseError( "Does not accept arguments" );
|
||||
config.setAllowThrows( false );
|
||||
}
|
||||
|
||||
}
|
||||
catch( std::exception& ex ) {
|
||||
config.setError( ex.what() );
|
||||
|
Reference in New Issue
Block a user