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:
@@ -34,6 +34,7 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
4A3D7DD01503869D005F9203 /* catch_matchers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_matchers.hpp; sourceTree = "<group>"; };
|
||||
4A6D0C20149B3D3B00DB3EAA /* CatchSelfTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CatchSelfTest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4A6D0C26149B3D3B00DB3EAA /* CatchSelfTest.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = CatchSelfTest.1; sourceTree = "<group>"; };
|
||||
4A6D0C2D149B3D9E00DB3EAA /* ApproxTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ApproxTests.cpp; path = ../../../SelfTest/ApproxTests.cpp; sourceTree = "<group>"; };
|
||||
@@ -193,6 +194,7 @@
|
||||
4A7ADB4314F631E10094FE10 /* catch_totals.hpp */,
|
||||
4AB1C73514F97BDA00F31DF7 /* catch_console_colour_impl.hpp */,
|
||||
4AB1C73714F97C1300F31DF7 /* catch_console_colour.hpp */,
|
||||
4A3D7DD01503869D005F9203 /* catch_matchers.hpp */,
|
||||
);
|
||||
name = internal;
|
||||
path = ../../../../include/internal;
|
||||
|
@@ -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