mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 13:25:41 +02:00
ARC support for Object-C projects
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
|
||||
-(void) tearDown
|
||||
{
|
||||
[obj release];
|
||||
arcSafeRelease( obj );
|
||||
}
|
||||
|
||||
OC_TEST_CASE( "OCTest/test1", "This is a test case" )
|
||||
@@ -41,6 +41,12 @@ OC_TEST_CASE( "OCTest/test2", "This is another test case" )
|
||||
|
||||
REQUIRE( obj.int_val == 2 );
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template<typename T>
|
||||
void useObject( const T& object ){}
|
||||
|
||||
template<typename T>
|
||||
void useObject( const T* object ){}
|
||||
|
||||
using namespace Catch::Matchers;
|
||||
OC_TEST_CASE( "OCTest/matchers", "Matches work with OC types (NSString so far)" )
|
||||
|
@@ -24,5 +24,5 @@ TEST_CASE( "OCTest/TestObj", "tests TestObj" )
|
||||
|
||||
REQUIRE( obj.int_val == 1 );
|
||||
|
||||
[obj release];
|
||||
arcSafeRelease( obj );
|
||||
}
|
||||
|
Reference in New Issue
Block a user