mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
ARC support for Object-C projects
This commit is contained in:
@@ -193,6 +193,7 @@
|
||||
4A63D2B014E3C1A900F615CB /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -200,6 +201,7 @@
|
||||
4A63D2B114E3C1A900F615CB /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
@@ -223,6 +225,7 @@
|
||||
4A63D2B114E3C1A900F615CB /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
|
@@ -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