diff --git a/.gitignore b/.gitignore index 35fc7a6e..0b5b0a97 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -Test/build +*.build *.pbxuser *.mode1v3 *.ncb diff --git a/Test/TestMain.cpp b/Test/TestMain.cpp index 0fc13551..b2bf7f84 100644 --- a/Test/TestMain.cpp +++ b/Test/TestMain.cpp @@ -61,7 +61,17 @@ int main (int argc, char * const argv[]) if( result == 0 ) { - std::cout << "All " << runner.getSuccessCount() + runner.getFailureCount() << " tests completed successfully" << std::endl; + const size_t expectedTestCaseCount = 99; // !TBD factor this out + size_t testCaseCount = runner.getSuccessCount() + runner.getFailureCount(); + std::cout << "All " << testCaseCount << " tests completed successfully" << std::endl; + if( testCaseCount != expectedTestCaseCount ) + { + std::cerr << "- but we were expecting " << expectedTestCaseCount + << " test to run. Where some added or removed, or were they not compiled in?" + << std::endl; + return 1; + } + } return result; } diff --git a/Test/TrickyTests.cpp b/Test/TrickyTests.cpp index 3b74675d..e12aa9af 100644 --- a/Test/TrickyTests.cpp +++ b/Test/TrickyTests.cpp @@ -42,3 +42,22 @@ TEST_CASE( "succeeding/Tricky/complex lhs", "Where the LHS is not a simple value EXPECT( a == 2 || b == 2 ); } +struct Opaque +{ + int val; + bool operator ==( const Opaque& o ) + { + return val == o.val; + } +}; + +TEST_CASE( "failing/Tricky/non streamable type", "A failing expression with a non streamable type is still captured" ) +{ + + Opaque o1, o2; + o1.val = 7; + o2.val = 8; + + CHECK( &o1 == &o2 ); + CHECK( o1 == o2 ); +} diff --git a/Test/Xcode/OCTest/CatchOCTestCase.h b/Test/Xcode/OCTest/CatchOCTestCase.h new file mode 100644 index 00000000..da6048f3 --- /dev/null +++ b/Test/Xcode/OCTest/CatchOCTestCase.h @@ -0,0 +1,19 @@ +// +// CatchOCTestCase.h +// OCTest +// +// Created by Phil on 13/11/2010. +// Copyright 2010 Two Blue Cubes Ltd. All rights reserved. +// + +#include "../../../catch_objc.hpp" + +#import +#import "TestObj.h" + +@interface TestFixture : NSObject +{ + TestObj* obj; +} + +@end \ No newline at end of file diff --git a/Test/Xcode/OCTest/CatchOCTestCase.mm b/Test/Xcode/OCTest/CatchOCTestCase.mm new file mode 100644 index 00000000..8398d1ad --- /dev/null +++ b/Test/Xcode/OCTest/CatchOCTestCase.mm @@ -0,0 +1,43 @@ +// +// CatchOCTestCase.mm +// OCTest +// +// Created by Phil Nash on 13/11/2010. +// Copyright 2010 Two Blue Cubes Ltd. All rights reserved. +// + +#import "CatchOCTestCase.h" + + +@implementation TestFixture + + +-(void) setUp +{ + obj = [[TestObj alloc] init]; +} + +-(void) tearDown +{ + [obj release]; +} + +OC_TEST_CASE( "OCTest/test1", "This is a test case" ) +{ + EXPECT( obj.int_val == 0 ); + + obj.int_val = 1; + + EXPECT( obj.int_val == 1 ); +} + +OC_TEST_CASE( "OCTest/test2", "This is another test case" ) +{ + EXPECT( obj.int_val == 0 ); + + obj.int_val = 2; + + EXPECT( obj.int_val == 2 ); +} + +@end diff --git a/Test/Xcode/OCTest/Main.mm b/Test/Xcode/OCTest/Main.mm new file mode 100644 index 00000000..d0d77407 --- /dev/null +++ b/Test/Xcode/OCTest/Main.mm @@ -0,0 +1,17 @@ +#import +#import "../../../catch_runner.hpp" + +#import "CatchOCTestCase.h" + + +int main (int argc, const char * argv[]) { + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + + Catch::registerTestMethods(); + + // insert code here... + int result = Catch::Main( argc, (char* const*)argv ); + + [pool drain]; + return result; +} diff --git a/Test/Xcode/OCTest/OCTest.1 b/Test/Xcode/OCTest/OCTest.1 new file mode 100644 index 00000000..ff72db79 --- /dev/null +++ b/Test/Xcode/OCTest/OCTest.1 @@ -0,0 +1,79 @@ +.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. +.\"See Also: +.\"man mdoc.samples for a complete listing of options +.\"man mdoc for the short list of editing options +.\"/usr/share/misc/mdoc.template +.Dd 13/11/2010 \" DATE +.Dt OCTest 1 \" Program name and manual section number +.Os Darwin +.Sh NAME \" Section Header - required - don't modify +.Nm OCTest, +.\" The following lines are read in generating the apropos(man -k) database. Use only key +.\" words here as the database is built based on the words here and in the .ND line. +.Nm Other_name_for_same_program(), +.Nm Yet another name for the same program. +.\" Use .Nm macro to designate other names for the documented program. +.Nd This line parsed for whatis database. +.Sh SYNOPSIS \" Section Header - required - don't modify +.Nm +.Op Fl abcd \" [-abcd] +.Op Fl a Ar path \" [-a path] +.Op Ar file \" [file] +.Op Ar \" [file ...] +.Ar arg0 \" Underlined argument - use .Ar anywhere to underline +arg2 ... \" Arguments +.Sh DESCRIPTION \" Section Header - required - don't modify +Use the .Nm macro to refer to your program throughout the man page like such: +.Nm +Underlining is accomplished with the .Ar macro like this: +.Ar underlined text . +.Pp \" Inserts a space +A list of items with descriptions: +.Bl -tag -width -indent \" Begins a tagged list +.It item a \" Each item preceded by .It macro +Description of item a +.It item b +Description of item b +.El \" Ends the list +.Pp +A list of flags and their descriptions: +.Bl -tag -width -indent \" Differs from above in tag removed +.It Fl a \"-a flag as a list item +Description of -a flag +.It Fl b +Description of -b flag +.El \" Ends the list +.Pp +.\" .Sh ENVIRONMENT \" May not be needed +.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 +.\" .It Ev ENV_VAR_1 +.\" Description of ENV_VAR_1 +.\" .It Ev ENV_VAR_2 +.\" Description of ENV_VAR_2 +.\" .El +.Sh FILES \" File used or created by the topic of the man page +.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact +.It Pa /usr/share/file_name +FILE_1 description +.It Pa /Users/joeuser/Library/really_long_file_name +FILE_2 description +.El \" Ends the list +.\" .Sh DIAGNOSTICS \" May not be needed +.\" .Bl -diag +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .El +.Sh SEE ALSO +.\" List links in ascending order by section, alphabetically within a section. +.\" Please do not reference files that do not exist without filing a bug report +.Xr a 1 , +.Xr b 1 , +.Xr c 1 , +.Xr a 2 , +.Xr b 2 , +.Xr a 3 , +.Xr b 3 +.\" .Sh BUGS \" Document known, unremedied bugs +.\" .Sh HISTORY \" Document history if command behaves in a unique manner \ No newline at end of file diff --git a/Test/Xcode/OCTest/OCTest.mm b/Test/Xcode/OCTest/OCTest.mm new file mode 100644 index 00000000..f8da274b --- /dev/null +++ b/Test/Xcode/OCTest/OCTest.mm @@ -0,0 +1,25 @@ +/* + * OCTest.mm + * OCTest + * + * Created by Phil on 13/11/2010. + * Copyright 2010 Two Blue Cubes Ltd. All rights reserved. + * + */ + +#import "../../../catch.hpp" + +#import "TestObj.h" + +TEST_CASE( "OCTest/TestObj", "tests TestObj" ) +{ + TestObj* obj = [[TestObj alloc] init]; + + EXPECT( obj.int_val == 0 ); + + obj.int_val = 1; + + EXPECT( obj.int_val == 1 ); + + [obj release]; +} diff --git a/Test/Xcode/OCTest/OCTest.xcodeproj/project.pbxproj b/Test/Xcode/OCTest/OCTest.xcodeproj/project.pbxproj new file mode 100644 index 00000000..22fded32 --- /dev/null +++ b/Test/Xcode/OCTest/OCTest.xcodeproj/project.pbxproj @@ -0,0 +1,237 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 4A5953B5128E95B8009DC1B9 /* TestObj.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A5953B4128E95B8009DC1B9 /* TestObj.m */; }; + 4A5953B7128E95D6009DC1B9 /* OCTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A5953B6128E95D6009DC1B9 /* OCTest.mm */; }; + 4A5953F1128E9A61009DC1B9 /* CatchOCTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A5953F0128E9A61009DC1B9 /* CatchOCTestCase.mm */; }; + 8DD76F9A0486AA7600D96B5E /* Main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* Main.mm */; settings = {ATTRIBUTES = (); }; }; + 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; + 8DD76F9F0486AA7600D96B5E /* OCTest.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6859EA3029092ED04C91782 /* OCTest.1 */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F9E0486AA7600D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + 8DD76F9F0486AA7600D96B5E /* OCTest.1 in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 08FB7796FE84155DC02AAC07 /* Main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Main.mm; sourceTree = ""; }; + 08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 32A70AAB03705E1F00C91783 /* OCTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCTest_Prefix.pch; sourceTree = ""; }; + 4A5953B3128E95B8009DC1B9 /* TestObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestObj.h; sourceTree = ""; }; + 4A5953B4128E95B8009DC1B9 /* TestObj.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestObj.m; sourceTree = ""; }; + 4A5953B6128E95D6009DC1B9 /* OCTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OCTest.mm; sourceTree = ""; }; + 4A5953EF128E9A61009DC1B9 /* CatchOCTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatchOCTestCase.h; sourceTree = ""; }; + 4A5953F0128E9A61009DC1B9 /* CatchOCTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CatchOCTestCase.mm; sourceTree = ""; }; + 8DD76FA10486AA7600D96B5E /* OCTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = OCTest; sourceTree = BUILT_PRODUCTS_DIR; }; + C6859EA3029092ED04C91782 /* OCTest.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = OCTest.1; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F9B0486AA7600D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* OCTest */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + C6859EA2029092E104C91782 /* Documentation */, + 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = OCTest; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 32A70AAB03705E1F00C91783 /* OCTest_Prefix.pch */, + 08FB7796FE84155DC02AAC07 /* Main.mm */, + 4A5953B3128E95B8009DC1B9 /* TestObj.h */, + 4A5953B4128E95B8009DC1B9 /* TestObj.m */, + 4A5953B6128E95D6009DC1B9 /* OCTest.mm */, + 4A5953EF128E9A61009DC1B9 /* CatchOCTestCase.h */, + 4A5953F0128E9A61009DC1B9 /* CatchOCTestCase.mm */, + ); + name = Source; + sourceTree = ""; + }; + 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 08FB779EFE84155DC02AAC07 /* Foundation.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76FA10486AA7600D96B5E /* OCTest */, + ); + name = Products; + sourceTree = ""; + }; + C6859EA2029092E104C91782 /* Documentation */ = { + isa = PBXGroup; + children = ( + C6859EA3029092ED04C91782 /* OCTest.1 */, + ); + name = Documentation; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F960486AA7600D96B5E /* OCTest */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "OCTest" */; + buildPhases = ( + 8DD76F990486AA7600D96B5E /* Sources */, + 8DD76F9B0486AA7600D96B5E /* Frameworks */, + 8DD76F9E0486AA7600D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OCTest; + productInstallPath = "$(HOME)/bin"; + productName = OCTest; + productReference = 8DD76FA10486AA7600D96B5E /* OCTest */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "OCTest" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 08FB7794FE84155DC02AAC07 /* OCTest */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F960486AA7600D96B5E /* OCTest */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F990486AA7600D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DD76F9A0486AA7600D96B5E /* Main.mm in Sources */, + 4A5953B5128E95B8009DC1B9 /* TestObj.m in Sources */, + 4A5953B7128E95D6009DC1B9 /* OCTest.mm in Sources */, + 4A5953F1128E9A61009DC1B9 /* CatchOCTestCase.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB927508733DD40010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = OCTest_Prefix.pch; + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = OCTest; + }; + name = Debug; + }; + 1DEB927608733DD40010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = OCTest_Prefix.pch; + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = OCTest; + }; + name = Release; + }; + 1DEB927908733DD40010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; + SDKROOT = macosx10.6; + }; + name = Debug; + }; + 1DEB927A08733DD40010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = macosx10.6; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "OCTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB927508733DD40010E9CD /* Debug */, + 1DEB927608733DD40010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "OCTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB927908733DD40010E9CD /* Debug */, + 1DEB927A08733DD40010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/Test/Xcode/OCTest/OCTest_Prefix.pch b/Test/Xcode/OCTest/OCTest_Prefix.pch new file mode 100644 index 00000000..a89ea59c --- /dev/null +++ b/Test/Xcode/OCTest/OCTest_Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'OCTest' target in the 'OCTest' project. +// + +#ifdef __OBJC__ + #import +#endif diff --git a/Test/Xcode/OCTest/TestObj.h b/Test/Xcode/OCTest/TestObj.h new file mode 100644 index 00000000..ff02713d --- /dev/null +++ b/Test/Xcode/OCTest/TestObj.h @@ -0,0 +1,19 @@ +// +// TestObj.h +// OCTest +// +// Created by Phil on 13/11/2010. +// Copyright 2010 Two Blue Cubes Ltd. All rights reserved. +// + +#import + + +@interface TestObj : NSObject { + + int int_val; +} + +@property (nonatomic, assign ) int int_val; + +@end diff --git a/Test/Xcode/OCTest/TestObj.m b/Test/Xcode/OCTest/TestObj.m new file mode 100644 index 00000000..27f46f37 --- /dev/null +++ b/Test/Xcode/OCTest/TestObj.m @@ -0,0 +1,16 @@ +// +// TestObj.m +// OCTest +// +// Created by Phil on 13/11/2010. +// Copyright 2010 Two Blue Cubes Ltd. All rights reserved. +// + +#import "TestObj.h" + + +@implementation TestObj + +@synthesize int_val; + +@end diff --git a/Test/Test.1 b/Test/Xcode/Test.1 similarity index 100% rename from Test/Test.1 rename to Test/Xcode/Test.1 diff --git a/Test/Xcode/Test.xcodeproj/project.pbxproj b/Test/Xcode/Test.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e46c8035 --- /dev/null +++ b/Test/Xcode/Test.xcodeproj/project.pbxproj @@ -0,0 +1,364 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ +<<<<<<< HEAD:Test/Test.xcodeproj/project.pbxproj + 4A3BFFB9128DCF06005609E3 /* TestMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A3BFFB8128DCF06005609E3 /* TestMain.cpp */; }; + 4AA7EA9212A438C7005A0B97 /* MiscTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AA7EA9112A438C7005A0B97 /* MiscTests.cpp */; }; + 4AFC38CD12887D80003A0C29 /* ConditionTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AFC38CC12887D80003A0C29 /* ConditionTests.cpp */; }; + 4AFC3A9912893C56003A0C29 /* ExceptionTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AFC3A9812893C56003A0C29 /* ExceptionTests.cpp */; }; + 4AFC3AA912893E54003A0C29 /* MessageTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AFC3AA812893E54003A0C29 /* MessageTests.cpp */; }; + 4AFC3B0B12894114003A0C29 /* ClassTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AFC3B0A12894114003A0C29 /* ClassTests.cpp */; }; + 4AFC3B671289C7E3003A0C29 /* TrickyTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AFC3B661289C7E3003A0C29 /* TrickyTests.cpp */; }; +======= + 4A595364128E920B009DC1B9 /* ClassTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A59535F128E920B009DC1B9 /* ClassTests.cpp */; }; + 4A595365128E920B009DC1B9 /* ConditionTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A595360128E920B009DC1B9 /* ConditionTests.cpp */; }; + 4A595366128E920B009DC1B9 /* ExceptionTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A595361128E920B009DC1B9 /* ExceptionTests.cpp */; }; + 4A595367128E920B009DC1B9 /* MessageTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A595362128E920B009DC1B9 /* MessageTests.cpp */; }; + 4A595368128E920B009DC1B9 /* TrickyTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A595363128E920B009DC1B9 /* TrickyTests.cpp */; }; + 4A59537A128E9354009DC1B9 /* TestMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A595379128E9354009DC1B9 /* TestMain.cpp */; }; +>>>>>>> 5f43a43662c8b9feca25aeccc79d1c7db664c9a0:Test/Xcode/Test.xcodeproj/project.pbxproj + 8DD76F6A0486A84900D96B5E /* Test.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6859E8B029090EE04C91782 /* Test.1 */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + 8DD76F6A0486A84900D96B5E /* Test.1 in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ +<<<<<<< HEAD:Test/Test.xcodeproj/project.pbxproj + 4A3BFFB8128DCF06005609E3 /* TestMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestMain.cpp; sourceTree = ""; }; + 4A3BFFF0128DD23C005609E3 /* catch_runnerconfig.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runnerconfig.hpp; path = ../internal/catch_runnerconfig.hpp; sourceTree = SOURCE_ROOT; }; + 4AA7E968129FA1DF005A0B97 /* catch_reporter_junit.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_reporter_junit.hpp; path = ../../../Lib/Catch/catch_reporter_junit.hpp; sourceTree = SOURCE_ROOT; }; + 4AA7EA9112A438C7005A0B97 /* MiscTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MiscTests.cpp; sourceTree = ""; }; + 4AFC341512809A36003A0C29 /* catch_capture.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_capture.hpp; path = ../internal/catch_capture.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC341612809A36003A0C29 /* catch_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = catch_common.h; path = ../internal/catch_common.h; sourceTree = SOURCE_ROOT; }; + 4AFC341712809A36003A0C29 /* catch_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_registry.hpp; path = ../internal/catch_registry.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC341812809A36003A0C29 /* catch_reporter_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_reporter_registry.hpp; path = ../internal/catch_reporter_registry.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC341912809A36003A0C29 /* catch_resultinfo.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_resultinfo.hpp; path = ../internal/catch_resultinfo.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC341A12809A36003A0C29 /* catch_runner_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runner_impl.hpp; path = ../internal/catch_runner_impl.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC341B12809A36003A0C29 /* catch_testcaseinfo.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_testcaseinfo.hpp; path = ../internal/catch_testcaseinfo.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC341C12809A45003A0C29 /* catch_default_main.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_default_main.hpp; path = ../catch_default_main.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC341D12809A45003A0C29 /* catch_reporter_basic.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_reporter_basic.hpp; path = ../catch_reporter_basic.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC341E12809A45003A0C29 /* catch_reporter_xml.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_reporter_xml.hpp; path = ../catch_reporter_xml.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC341F12809A45003A0C29 /* catch_list.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_list.hpp; path = ../internal/catch_list.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC342012809A45003A0C29 /* catch.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch.hpp; path = ../catch.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC346412809D41003A0C29 /* catch_commandline.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_commandline.hpp; path = ../internal/catch_commandline.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC359B1281F00B003A0C29 /* catch_section.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_section.hpp; path = ../internal/catch_section.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC38161284B387003A0C29 /* catch_runner.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runner.hpp; path = ../catch_runner.hpp; sourceTree = SOURCE_ROOT; }; + 4AFC38CC12887D80003A0C29 /* ConditionTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConditionTests.cpp; sourceTree = ""; }; + 4AFC3A9812893C56003A0C29 /* ExceptionTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExceptionTests.cpp; sourceTree = ""; }; + 4AFC3AA812893E54003A0C29 /* MessageTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageTests.cpp; sourceTree = ""; }; + 4AFC3B0A12894114003A0C29 /* ClassTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClassTests.cpp; sourceTree = ""; }; + 4AFC3B661289C7E3003A0C29 /* TrickyTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrickyTests.cpp; sourceTree = ""; }; +======= + 4A59535F128E920B009DC1B9 /* ClassTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClassTests.cpp; path = ../ClassTests.cpp; sourceTree = SOURCE_ROOT; }; + 4A595360128E920B009DC1B9 /* ConditionTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConditionTests.cpp; path = ../ConditionTests.cpp; sourceTree = SOURCE_ROOT; }; + 4A595361128E920B009DC1B9 /* ExceptionTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExceptionTests.cpp; path = ../ExceptionTests.cpp; sourceTree = SOURCE_ROOT; }; + 4A595362128E920B009DC1B9 /* MessageTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MessageTests.cpp; path = ../MessageTests.cpp; sourceTree = SOURCE_ROOT; }; + 4A595363128E920B009DC1B9 /* TrickyTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TrickyTests.cpp; path = ../TrickyTests.cpp; sourceTree = SOURCE_ROOT; }; + 4A595379128E9354009DC1B9 /* TestMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestMain.cpp; path = ../TestMain.cpp; sourceTree = SOURCE_ROOT; }; + 4A59537F128E93CA009DC1B9 /* catch_default_main.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_default_main.hpp; path = ../../catch_default_main.hpp; sourceTree = SOURCE_ROOT; }; + 4A595380128E93CA009DC1B9 /* catch_reporter_basic.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_reporter_basic.hpp; path = ../../catch_reporter_basic.hpp; sourceTree = SOURCE_ROOT; }; + 4A595381128E93CA009DC1B9 /* catch_reporter_xml.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_reporter_xml.hpp; path = ../../catch_reporter_xml.hpp; sourceTree = SOURCE_ROOT; }; + 4A595382128E93CA009DC1B9 /* catch_runner.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runner.hpp; path = ../../catch_runner.hpp; sourceTree = SOURCE_ROOT; }; + 4A595383128E93CA009DC1B9 /* catch.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch.hpp; path = ../../catch.hpp; sourceTree = SOURCE_ROOT; }; + 4A595384128E93E0009DC1B9 /* catch_capture.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_capture.hpp; path = ../../internal/catch_capture.hpp; sourceTree = SOURCE_ROOT; }; + 4A595385128E93E1009DC1B9 /* catch_commandline.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_commandline.hpp; path = ../../internal/catch_commandline.hpp; sourceTree = SOURCE_ROOT; }; + 4A595386128E93E1009DC1B9 /* catch_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = catch_common.h; path = ../../internal/catch_common.h; sourceTree = SOURCE_ROOT; }; + 4A595387128E93E1009DC1B9 /* catch_list.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_list.hpp; path = ../../internal/catch_list.hpp; sourceTree = SOURCE_ROOT; }; + 4A595388128E93E1009DC1B9 /* catch_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_registry.hpp; path = ../../internal/catch_registry.hpp; sourceTree = SOURCE_ROOT; }; + 4A595389128E93E1009DC1B9 /* catch_reporter_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_reporter_registry.hpp; path = ../../internal/catch_reporter_registry.hpp; sourceTree = SOURCE_ROOT; }; + 4A59538A128E93E1009DC1B9 /* catch_resultinfo.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_resultinfo.hpp; path = ../../internal/catch_resultinfo.hpp; sourceTree = SOURCE_ROOT; }; + 4A59538B128E93E1009DC1B9 /* catch_runner_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runner_impl.hpp; path = ../../internal/catch_runner_impl.hpp; sourceTree = SOURCE_ROOT; }; + 4A59538C128E93E1009DC1B9 /* catch_runnerconfig.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runnerconfig.hpp; path = ../../internal/catch_runnerconfig.hpp; sourceTree = SOURCE_ROOT; }; + 4A59538D128E93E1009DC1B9 /* catch_section.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_section.hpp; path = ../../internal/catch_section.hpp; sourceTree = SOURCE_ROOT; }; + 4A59538E128E93E1009DC1B9 /* catch_testcaseinfo.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_testcaseinfo.hpp; path = ../../internal/catch_testcaseinfo.hpp; sourceTree = SOURCE_ROOT; }; + 4A5955C412909CCC009DC1B9 /* catch_objc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_objc.hpp; path = ../../catch_objc.hpp; sourceTree = SOURCE_ROOT; }; +>>>>>>> 5f43a43662c8b9feca25aeccc79d1c7db664c9a0:Test/Xcode/Test.xcodeproj/project.pbxproj + 8DD76F6C0486A84900D96B5E /* Test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Test; sourceTree = BUILT_PRODUCTS_DIR; }; + C6859E8B029090EE04C91782 /* Test.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = Test.1; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* Test */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + C6859E8C029090F304C91782 /* Documentation */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = Test; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( +<<<<<<< HEAD:Test/Test.xcodeproj/project.pbxproj + 4AA7E96C129FA2A0005A0B97 /* Tests */, + 4A3BFFB8128DCF06005609E3 /* TestMain.cpp */, +======= + 4A595379128E9354009DC1B9 /* TestMain.cpp */, + 4A59535E128E91FA009DC1B9 /* Test Cases */, +>>>>>>> 5f43a43662c8b9feca25aeccc79d1c7db664c9a0:Test/Xcode/Test.xcodeproj/project.pbxproj + 4AFC341312809A12003A0C29 /* Catch */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* Test */, + ); + name = Products; + sourceTree = ""; + }; +<<<<<<< HEAD:Test/Test.xcodeproj/project.pbxproj + 4AA7E96B129FA282005A0B97 /* Reporters */ = { + isa = PBXGroup; + children = ( + 4AFC341D12809A45003A0C29 /* catch_reporter_basic.hpp */, + 4AFC341E12809A45003A0C29 /* catch_reporter_xml.hpp */, + 4AA7E968129FA1DF005A0B97 /* catch_reporter_junit.hpp */, + ); + name = Reporters; + sourceTree = ""; + }; + 4AA7E96C129FA2A0005A0B97 /* Tests */ = { + isa = PBXGroup; + children = ( + 4AA7EA9112A438C7005A0B97 /* MiscTests.cpp */, + 4AFC38CC12887D80003A0C29 /* ConditionTests.cpp */, + 4AFC3A9812893C56003A0C29 /* ExceptionTests.cpp */, + 4AFC3AA812893E54003A0C29 /* MessageTests.cpp */, + 4AFC3B0A12894114003A0C29 /* ClassTests.cpp */, + 4AFC3B661289C7E3003A0C29 /* TrickyTests.cpp */, + ); + name = Tests; +======= + 4A59535E128E91FA009DC1B9 /* Test Cases */ = { + isa = PBXGroup; + children = ( + 4A59535F128E920B009DC1B9 /* ClassTests.cpp */, + 4A595360128E920B009DC1B9 /* ConditionTests.cpp */, + 4A595361128E920B009DC1B9 /* ExceptionTests.cpp */, + 4A595362128E920B009DC1B9 /* MessageTests.cpp */, + 4A595363128E920B009DC1B9 /* TrickyTests.cpp */, + ); + name = "Test Cases"; +>>>>>>> 5f43a43662c8b9feca25aeccc79d1c7db664c9a0:Test/Xcode/Test.xcodeproj/project.pbxproj + sourceTree = ""; + }; + 4AFC341312809A12003A0C29 /* Catch */ = { + isa = PBXGroup; + children = ( +<<<<<<< HEAD:Test/Test.xcodeproj/project.pbxproj + 4AFC342012809A45003A0C29 /* catch.hpp */, + 4AFC341C12809A45003A0C29 /* catch_default_main.hpp */, + 4AFC38161284B387003A0C29 /* catch_runner.hpp */, + 4AA7E96B129FA282005A0B97 /* Reporters */, +======= + 4A5955C412909CCC009DC1B9 /* catch_objc.hpp */, + 4A59537F128E93CA009DC1B9 /* catch_default_main.hpp */, + 4A595380128E93CA009DC1B9 /* catch_reporter_basic.hpp */, + 4A595381128E93CA009DC1B9 /* catch_reporter_xml.hpp */, + 4A595382128E93CA009DC1B9 /* catch_runner.hpp */, + 4A595383128E93CA009DC1B9 /* catch.hpp */, +>>>>>>> 5f43a43662c8b9feca25aeccc79d1c7db664c9a0:Test/Xcode/Test.xcodeproj/project.pbxproj + 4AFC341412809A1B003A0C29 /* Internal */, + ); + name = Catch; + sourceTree = ""; + }; + 4AFC341412809A1B003A0C29 /* Internal */ = { + isa = PBXGroup; + children = ( + 4A595384128E93E0009DC1B9 /* catch_capture.hpp */, + 4A595385128E93E1009DC1B9 /* catch_commandline.hpp */, + 4A595386128E93E1009DC1B9 /* catch_common.h */, + 4A595387128E93E1009DC1B9 /* catch_list.hpp */, + 4A595388128E93E1009DC1B9 /* catch_registry.hpp */, + 4A595389128E93E1009DC1B9 /* catch_reporter_registry.hpp */, + 4A59538A128E93E1009DC1B9 /* catch_resultinfo.hpp */, + 4A59538B128E93E1009DC1B9 /* catch_runner_impl.hpp */, + 4A59538C128E93E1009DC1B9 /* catch_runnerconfig.hpp */, + 4A59538D128E93E1009DC1B9 /* catch_section.hpp */, + 4A59538E128E93E1009DC1B9 /* catch_testcaseinfo.hpp */, + ); + name = Internal; + sourceTree = ""; + }; + C6859E8C029090F304C91782 /* Documentation */ = { + isa = PBXGroup; + children = ( + C6859E8B029090EE04C91782 /* Test.1 */, + ); + name = Documentation; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* Test */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Test" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Test; + productInstallPath = "$(HOME)/bin"; + productName = Test; + productReference = 8DD76F6C0486A84900D96B5E /* Test */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Test" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 08FB7794FE84155DC02AAC07 /* Test */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* Test */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( +<<<<<<< HEAD:Test/Test.xcodeproj/project.pbxproj + 4AFC38CD12887D80003A0C29 /* ConditionTests.cpp in Sources */, + 4AFC3A9912893C56003A0C29 /* ExceptionTests.cpp in Sources */, + 4AFC3AA912893E54003A0C29 /* MessageTests.cpp in Sources */, + 4AFC3B0B12894114003A0C29 /* ClassTests.cpp in Sources */, + 4AFC3B671289C7E3003A0C29 /* TrickyTests.cpp in Sources */, + 4A3BFFB9128DCF06005609E3 /* TestMain.cpp in Sources */, + 4AA7EA9212A438C7005A0B97 /* MiscTests.cpp in Sources */, +======= + 4A595364128E920B009DC1B9 /* ClassTests.cpp in Sources */, + 4A595365128E920B009DC1B9 /* ConditionTests.cpp in Sources */, + 4A595366128E920B009DC1B9 /* ExceptionTests.cpp in Sources */, + 4A595367128E920B009DC1B9 /* MessageTests.cpp in Sources */, + 4A595368128E920B009DC1B9 /* TrickyTests.cpp in Sources */, + 4A59537A128E9354009DC1B9 /* TestMain.cpp in Sources */, +>>>>>>> 5f43a43662c8b9feca25aeccc79d1c7db664c9a0:Test/Xcode/Test.xcodeproj/project.pbxproj + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = Test; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = Test; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; + SDKROOT = macosx10.6; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = macosx10.6; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + 1DEB923308733DC60010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + 1DEB923708733DC60010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/catch_objc.hpp b/catch_objc.hpp new file mode 100644 index 00000000..9a92c31d --- /dev/null +++ b/catch_objc.hpp @@ -0,0 +1,143 @@ +/* + * catch_objc.hpp + * Test + * + * Created by Phil on 14/11/2010. + * Copyright 2010 Two Blue Cubes Ltd. All rights reserved. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + +#ifndef TWOBLUECUBES_CATCH_OBJC_HPP_INCLUDED +#define TWOBLUECUBES_CATCH_OBJC_HPP_INCLUDED + +#import +#include +#include "catch.hpp" + +@protocol OcFixture + +@optional + +-(void) setUp; +-(void) tearDown; + +@end + +namespace Catch +{ + class OcMethod : public TestCase + { + public: + OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) + { + } + + virtual void invoke() const + { + id obj = class_createInstance( m_cls, 0 ); + obj = [obj init]; + + if( [obj respondsToSelector: @selector(setUp) ] ) + [obj performSelector: @selector(setUp)]; + + if( [obj respondsToSelector: m_sel] ) + [obj performSelector: m_sel]; + + if( [obj respondsToSelector: @selector(tearDown) ] ) + [obj performSelector: @selector(tearDown)]; + + [obj release]; + } + + virtual TestCase* clone() const + { + return new OcMethod( m_cls, m_sel ); + } + + virtual bool operator == ( const TestCase& other ) const + { + const OcMethod* ocmOther = dynamic_cast ( &other ); + return ocmOther && ocmOther->m_sel == m_sel; + } + + virtual bool operator < ( const TestCase& other ) const + { + const OcMethod* ocmOther = dynamic_cast ( &other ); + return ocmOther && ocmOther->m_sel < m_sel; + } + + private: + Class m_cls; + SEL m_sel; + }; + + namespace Detail + { + + inline bool startsWith( const std::string& str, const std::string& sub ) + { + return str.length() > sub.length() && str.substr( 0, sub.length() ) == sub; + } + + inline const char* getAnnotation( Class cls, const std::string& annotationName, const std::string& testCaseName ) + { + NSString* selStr = [[NSString alloc] initWithFormat:@"Catch_%s_%s", annotationName.c_str(), testCaseName.c_str()]; + SEL sel = NSSelectorFromString( selStr ); + [selStr release]; + if( [cls respondsToSelector: sel] ) + return (const char*)[cls performSelector: sel]; + return ""; + } + } + + inline size_t registerTestMethods() + { + size_t noTestMethods = 0; + int noClasses = objc_getClassList( NULL, 0 ); + + std::vector classes( noClasses ); + objc_getClassList( &classes[0], noClasses ); + + for( int c = 0; c < noClasses; c++ ) + { + Class cls = classes[c]; + { + u_int count; + Method* methods = class_copyMethodList( cls, &count ); + for( int m = 0; m < count ; m++ ) + { + SEL selector = method_getName(methods[m]); + std::string methodName = sel_getName(selector); + if( Detail::startsWith( methodName, "Catch_TestCase_" ) ) + { + std::string testCaseName = methodName.substr( 15 ); + std::string name = Detail::getAnnotation( cls, "Name", testCaseName ); + std::string desc = Detail::getAnnotation( cls, "Description", testCaseName ); + + TestRegistry::instance().registerTest( TestCaseInfo( new OcMethod( cls, selector ), name, desc ) ); + noTestMethods++; + + } + } + free(methods); + } + } + return noTestMethods; + } +} + +#define OC_TEST_CASE( name, desc )\ ++(const char*) INTERNAL_CATCH_UNIQUE_NAME( Catch_Name_test ) \ +{\ +return name; \ +}\ ++(const char*) INTERNAL_CATCH_UNIQUE_NAME( Catch_Description_test ) \ +{ \ +return desc; \ +} \ +-(void) INTERNAL_CATCH_UNIQUE_NAME( Catch_TestCase_test ) + +#endif // TWOBLUECUBES_CATCH_OBJC_HPP_INCLUDED \ No newline at end of file diff --git a/internal/catch_capture.hpp b/internal/catch_capture.hpp index cb1dd52f..5356874d 100644 --- a/internal/catch_capture.hpp +++ b/internal/catch_capture.hpp @@ -18,13 +18,66 @@ namespace Catch { +namespace Detail +{ + // The following code, contributed by Sam Partington, allows us to choose an implementation + // of toString() depending on whether a << overload is available + + struct NonStreamable + { + // allow construction from anything... + template + NonStreamable(Anything) + {} + }; + + // a local operator<< which may be called if there isn't a better one elsewhere... + inline NonStreamable operator << ( std::ostream&, const NonStreamable& ns ) + { + return ns; + } + + template + struct IsStreamable + { + static NoType Deduce( const NonStreamable& ); + static YesType Deduce( std::ostream& ); + + enum + { + value = sizeof( Deduce( Synth() << Synth() ) ) + == sizeof( YesType ) + }; + }; + + // << is available, so use it with ostringstream to make the string + template + struct StringMaker + { + static std::string apply( const T& value ) + { + std::ostringstream oss; + oss << value; + return oss.str(); + } + }; + + // << not available - use a default string + template + struct StringMaker + { + static std::string apply( const T& value ) + { + return "{?}"; + } + }; + +}// end namespace Detail template std::string toString( const T& value ) { - std::ostringstream oss; - oss << value; - return oss.str(); + return Detail::StringMaker::value>::apply( value ); } class TestFailureException diff --git a/internal/catch_common.h b/internal/catch_common.h index d94ca34c..46460853 100644 --- a/internal/catch_common.h +++ b/internal/catch_common.h @@ -26,6 +26,12 @@ namespace Catch protected: NonCopyable(){} }; + + typedef char NoType; + typedef int YesType; + + // create a T for use in sizeof expressions + template T Synth(); } #endif // TWOBLUECUBES_CATCH_COMMON_H_INCLUDED \ No newline at end of file diff --git a/internal/catch_registry.hpp b/internal/catch_registry.hpp index 24ac89e3..dcd0d13b 100644 --- a/internal/catch_registry.hpp +++ b/internal/catch_registry.hpp @@ -16,8 +16,11 @@ #include "catch_common.h" #include +#include #include +#include + namespace Catch { class TestRegistry @@ -32,17 +35,22 @@ public: void registerTest( const TestCaseInfo& testInfo ) { - m_functions.push_back( testInfo ); + if( m_functions.find( testInfo ) == m_functions.end() ) + { + m_functions.insert( testInfo ); + m_functionsInOrder.push_back( testInfo ); + } } std::vector getAllTests() const { - return m_functions; + return m_functionsInOrder; } private: - std::vector m_functions; + std::set m_functions; + std::vector m_functionsInOrder; }; typedef void(*TestFunction)(); @@ -63,6 +71,18 @@ struct FreeFunctionTestCase : TestCase return new FreeFunctionTestCase( fun ); } + virtual bool operator == ( const TestCase& other ) const + { + const FreeFunctionTestCase* ffOther = dynamic_cast ( &other ); + return ffOther && fun == ffOther->fun; + } + + virtual bool operator < ( const TestCase& other ) const + { + const FreeFunctionTestCase* ffOther = dynamic_cast ( &other ); + return ffOther && fun < ffOther->fun; + } + private: TestFunction fun; }; @@ -84,6 +104,18 @@ struct MethodTestCase : TestCase { return new MethodTestCase( method ); } + + virtual bool operator == ( const TestCase& other ) const + { + const MethodTestCase* mtOther = dynamic_cast( &other ); + return mtOther && method == mtOther->method; + } + + virtual bool operator < ( const TestCase& other ) const + { + const MethodTestCase* mtOther = dynamic_cast( &other ); + return mtOther && &method < &mtOther->method; + } private: void (C::*method)(); diff --git a/internal/catch_testcaseinfo.hpp b/internal/catch_testcaseinfo.hpp index 62bbeb87..696d82cb 100644 --- a/internal/catch_testcaseinfo.hpp +++ b/internal/catch_testcaseinfo.hpp @@ -23,6 +23,8 @@ namespace Catch virtual ~TestCase(){} virtual void invoke() const = 0; virtual TestCase* clone() const = 0; + virtual bool operator == ( const TestCase& other ) const = 0; + virtual bool operator < ( const TestCase& other ) const = 0; }; class TestCaseInfo @@ -79,6 +81,21 @@ namespace Catch description.swap( other.description ); } + bool operator == ( const TestCaseInfo& other ) const + { + return *test == *other.test && name == other.name && description == other.description; + } + + bool operator < ( const TestCaseInfo& other ) const + { + if( name < other.name ) + return true; + if( name > other.name ) + return false; + + return *test < *other.test; + } + private: TestCase* test; std::string name;