mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Moved boilerplate main for obj bindings into header
This commit is contained in:
parent
9a79ee7958
commit
04ecced419
@ -1,17 +1 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import "../../../catch_objc_main.hpp"
|
||||||
#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;
|
|
||||||
}
|
|
||||||
|
@ -37,6 +37,27 @@
|
|||||||
4A5953B6128E95D6009DC1B9 /* OCTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OCTest.mm; sourceTree = "<group>"; };
|
4A5953B6128E95D6009DC1B9 /* OCTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OCTest.mm; sourceTree = "<group>"; };
|
||||||
4A5953EF128E9A61009DC1B9 /* CatchOCTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatchOCTestCase.h; sourceTree = "<group>"; };
|
4A5953EF128E9A61009DC1B9 /* CatchOCTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatchOCTestCase.h; sourceTree = "<group>"; };
|
||||||
4A5953F0128E9A61009DC1B9 /* CatchOCTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CatchOCTestCase.mm; sourceTree = "<group>"; };
|
4A5953F0128E9A61009DC1B9 /* CatchOCTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CatchOCTestCase.mm; sourceTree = "<group>"; };
|
||||||
|
4AFDF58312CA9E4000F15202 /* 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; };
|
||||||
|
4AFDF58412CA9E4000F15202 /* catch_objc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_objc.hpp; path = ../../../catch_objc.hpp; sourceTree = SOURCE_ROOT; };
|
||||||
|
4AFDF58512CA9E4000F15202 /* 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; };
|
||||||
|
4AFDF58612CA9E4000F15202 /* catch_reporter_junit.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_reporter_junit.hpp; path = ../../../catch_reporter_junit.hpp; sourceTree = SOURCE_ROOT; };
|
||||||
|
4AFDF58712CA9E4000F15202 /* 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; };
|
||||||
|
4AFDF58812CA9E4000F15202 /* catch_runner.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runner.hpp; path = ../../../catch_runner.hpp; sourceTree = SOURCE_ROOT; };
|
||||||
|
4AFDF58912CA9E4000F15202 /* catch.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch.hpp; path = ../../../catch.hpp; sourceTree = SOURCE_ROOT; };
|
||||||
|
4AFDF58B12CA9E4000F15202 /* catch_capture.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_capture.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF58C12CA9E4000F15202 /* catch_commandline.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_commandline.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF58D12CA9E4000F15202 /* catch_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_common.h; sourceTree = "<group>"; };
|
||||||
|
4AFDF58E12CA9E4000F15202 /* catch_debugger.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_debugger.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF58F12CA9E4000F15202 /* catch_list.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_list.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF59012CA9E4000F15202 /* catch_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_registry.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF59112CA9E4000F15202 /* catch_reporter_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_registry.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF59212CA9E4000F15202 /* catch_resultinfo.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_resultinfo.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF59312CA9E4000F15202 /* catch_runner_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_runner_impl.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF59412CA9E4000F15202 /* catch_runnerconfig.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_runnerconfig.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF59512CA9E4000F15202 /* catch_section.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_section.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF59612CA9E4000F15202 /* catch_testcaseinfo.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_testcaseinfo.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF59712CA9E4000F15202 /* catch_xmlwriter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_xmlwriter.hpp; sourceTree = "<group>"; };
|
||||||
|
4AFDF59812CA9E8600F15202 /* catch_objc_main.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_objc_main.hpp; path = ../../../catch_objc_main.hpp; sourceTree = SOURCE_ROOT; };
|
||||||
8DD76FA10486AA7600D96B5E /* OCTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = OCTest; sourceTree = BUILT_PRODUCTS_DIR; };
|
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 = "<group>"; };
|
C6859EA3029092ED04C91782 /* OCTest.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = OCTest.1; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
@ -67,6 +88,7 @@
|
|||||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
4AFDF58212CA9E2800F15202 /* Catch */,
|
||||||
32A70AAB03705E1F00C91783 /* OCTest_Prefix.pch */,
|
32A70AAB03705E1F00C91783 /* OCTest_Prefix.pch */,
|
||||||
08FB7796FE84155DC02AAC07 /* Main.mm */,
|
08FB7796FE84155DC02AAC07 /* Main.mm */,
|
||||||
4A5953B3128E95B8009DC1B9 /* TestObj.h */,
|
4A5953B3128E95B8009DC1B9 /* TestObj.h */,
|
||||||
@ -94,6 +116,43 @@
|
|||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
4AFDF58212CA9E2800F15202 /* Catch */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
4AFDF59812CA9E8600F15202 /* catch_objc_main.hpp */,
|
||||||
|
4AFDF58312CA9E4000F15202 /* catch_default_main.hpp */,
|
||||||
|
4AFDF58412CA9E4000F15202 /* catch_objc.hpp */,
|
||||||
|
4AFDF58512CA9E4000F15202 /* catch_reporter_basic.hpp */,
|
||||||
|
4AFDF58612CA9E4000F15202 /* catch_reporter_junit.hpp */,
|
||||||
|
4AFDF58712CA9E4000F15202 /* catch_reporter_xml.hpp */,
|
||||||
|
4AFDF58812CA9E4000F15202 /* catch_runner.hpp */,
|
||||||
|
4AFDF58912CA9E4000F15202 /* catch.hpp */,
|
||||||
|
4AFDF58A12CA9E4000F15202 /* internal */,
|
||||||
|
);
|
||||||
|
name = Catch;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
4AFDF58A12CA9E4000F15202 /* internal */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
4AFDF58B12CA9E4000F15202 /* catch_capture.hpp */,
|
||||||
|
4AFDF58C12CA9E4000F15202 /* catch_commandline.hpp */,
|
||||||
|
4AFDF58D12CA9E4000F15202 /* catch_common.h */,
|
||||||
|
4AFDF58E12CA9E4000F15202 /* catch_debugger.hpp */,
|
||||||
|
4AFDF58F12CA9E4000F15202 /* catch_list.hpp */,
|
||||||
|
4AFDF59012CA9E4000F15202 /* catch_registry.hpp */,
|
||||||
|
4AFDF59112CA9E4000F15202 /* catch_reporter_registry.hpp */,
|
||||||
|
4AFDF59212CA9E4000F15202 /* catch_resultinfo.hpp */,
|
||||||
|
4AFDF59312CA9E4000F15202 /* catch_runner_impl.hpp */,
|
||||||
|
4AFDF59412CA9E4000F15202 /* catch_runnerconfig.hpp */,
|
||||||
|
4AFDF59512CA9E4000F15202 /* catch_section.hpp */,
|
||||||
|
4AFDF59612CA9E4000F15202 /* catch_testcaseinfo.hpp */,
|
||||||
|
4AFDF59712CA9E4000F15202 /* catch_xmlwriter.hpp */,
|
||||||
|
);
|
||||||
|
name = internal;
|
||||||
|
path = ../../../internal;
|
||||||
|
sourceTree = SOURCE_ROOT;
|
||||||
|
};
|
||||||
C6859EA2029092E104C91782 /* Documentation */ = {
|
C6859EA2029092E104C91782 /* Documentation */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
31
catch_objc_main.hpp
Normal file
31
catch_objc_main.hpp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* catch_objc_main.hpp
|
||||||
|
* OCTest
|
||||||
|
*
|
||||||
|
* Created by Phil on 28/12/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_MAIN_HPP_INCLUDED
|
||||||
|
#define TWOBLUECUBES_CATCH_OBJC_MAIN_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "catch_runner.hpp"
|
||||||
|
#include "catch_objc.hpp"
|
||||||
|
|
||||||
|
int main (int argc, const char * argv[])
|
||||||
|
{
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
|
Catch::registerTestMethods();
|
||||||
|
|
||||||
|
int result = Catch::Main( argc, (char* const*)argv );
|
||||||
|
|
||||||
|
[pool drain];
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user