mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Added support for Objective-C exceptions
This commit is contained in:
@@ -41,6 +41,18 @@ OC_TEST_CASE( "OCTest/test2", "This is another test case" )
|
||||
|
||||
REQUIRE( obj.int_val == 2 );
|
||||
}
|
||||
|
||||
OC_TEST_CASE( "OCTest/throws/objc", "throws an Objective-C exception" )
|
||||
{
|
||||
@throw [[NSException alloc] initWithName: NSGenericException
|
||||
reason: @"Objective-C exception"
|
||||
userInfo: nil];
|
||||
}
|
||||
OC_TEST_CASE( "OCTest/throws/stdc++", "throws a std c++ exception" )
|
||||
{
|
||||
throw std::domain_error( "std C++ exception" );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template<typename T>
|
||||
void useObject( const T& object ){}
|
||||
|
Reference in New Issue
Block a user