Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Added tests to iOStest

Currently fails to build for ARM due to Github issue #61
Commit
25db95816e6cc006f68400bd78fccf93670eef72
Author
Phil Nash ·
Parents
e1f1c6ca7e0e

Files · Download .tar.gz

Changes

 .../iOSTest/iOSTest.xcodeproj/project.pbxproj      | 11 +++++++++
 projects/XCode4/iOSTest/iOSTest/OCTest.mm          | 27 ++++++++++++++++++++++
 projects/XCode4/iOSTest/iOSTest/TestObj.h          | 21 +++++++++++++++++
 projects/XCode4/iOSTest/iOSTest/TestObj.m          | 18 +++++++++++++++
 4 files changed, 77 insertions(+)

diff --git a/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.pbxproj b/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.pbxproj
index 5b4c12f4..1acdb272 100644
--- a/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.pbxproj
+++ b/projects/XCode4/iOSTest/iOSTest.xcodeproj/project.pbxproj
@@ -12,6 +12,8 @@
 		4A73280E14E66CFC0044823F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A73280D14E66CFC0044823F /* CoreGraphics.framework */; };
 		4A73281414E66CFC0044823F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4A73281214E66CFC0044823F /* InfoPlist.strings */; };
 		4A73282614E66D8B0044823F /* itChRunnerMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A73282514E66D8B0044823F /* itChRunnerMain.mm */; };
+		4AB1C74F14FCC74900F31DF7 /* OCTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4AB1C74C14FCC74900F31DF7 /* OCTest.mm */; };
+		4AB1C75014FCC74900F31DF7 /* TestObj.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AB1C74E14FCC74900F31DF7 /* TestObj.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -26,6 +28,9 @@
 		4A73282314E66D8B0044823F /* iTchRunnerMainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTchRunnerMainView.h; sourceTree = "<group>"; };
 		4A73282414E66D8B0044823F /* iTchRunnerReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTchRunnerReporter.h; sourceTree = "<group>"; };
 		4A73282514E66D8B0044823F /* itChRunnerMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = itChRunnerMain.mm; path = ../../../runners/iTchRunner/itChRunnerMain.mm; sourceTree = "<group>"; };
+		4AB1C74C14FCC74900F31DF7 /* OCTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OCTest.mm; sourceTree = "<group>"; };
+		4AB1C74D14FCC74900F31DF7 /* TestObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestObj.h; sourceTree = "<group>"; };
+		4AB1C74E14FCC74900F31DF7 /* TestObj.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestObj.m; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -91,6 +96,9 @@
 		4A73282014E66D6C0044823F /* iTch */ = {
 			isa = PBXGroup;
 			children = (
+				4AB1C74C14FCC74900F31DF7 /* OCTest.mm */,
+				4AB1C74D14FCC74900F31DF7 /* TestObj.h */,
+				4AB1C74E14FCC74900F31DF7 /* TestObj.m */,
 				4A73282114E66D8B0044823F /* internal */,
 				4A73282514E66D8B0044823F /* itChRunnerMain.mm */,
 			);
@@ -170,6 +178,8 @@
 			buildActionMask = 2147483647;
 			files = (
 				4A73282614E66D8B0044823F /* itChRunnerMain.mm in Sources */,
+				4AB1C74F14FCC74900F31DF7 /* OCTest.mm in Sources */,
+				4AB1C75014FCC74900F31DF7 /* TestObj.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -279,6 +289,7 @@
 				4A73281F14E66CFC0044823F /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
 		};
 /* End XCConfigurationList section */
 	};
diff --git a/projects/XCode4/iOSTest/iOSTest/OCTest.mm b/projects/XCode4/iOSTest/iOSTest/OCTest.mm
new file mode 100644
index 00000000..c69575a6
--- /dev/null
+++ b/projects/XCode4/iOSTest/iOSTest/OCTest.mm
@@ -0,0 +1,27 @@
+/*
+ *  OCTest.mm
+ *  OCTest
+ *
+ *  Created by Phil on 13/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)
+ *
+ */
+#include "catch.hpp"
+
+#import "TestObj.h"
+
+TEST_CASE( "OCTest/TestObj", "tests TestObj" )
+{
+    TestObj* obj = [[TestObj alloc] init];
+    
+    REQUIRE( obj.int_val == 0 );
+    
+    obj.int_val = 1;
+    
+    REQUIRE( obj.int_val == 1 );
+    
+    [obj release];
+}
diff --git a/projects/XCode4/iOSTest/iOSTest/TestObj.h b/projects/XCode4/iOSTest/iOSTest/TestObj.h
new file mode 100644
index 00000000..388e9a8d
--- /dev/null
+++ b/projects/XCode4/iOSTest/iOSTest/TestObj.h
@@ -0,0 +1,21 @@
+//
+//  TestObj.h
+//  OCTest
+//
+//  Created by Phil on 13/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)
+
+#import <Foundation/Foundation.h>
+
+
+@interface TestObj : NSObject {
+
+    int int_val;
+}
+
+@property (nonatomic, assign ) int int_val;
+
+@end
diff --git a/projects/XCode4/iOSTest/iOSTest/TestObj.m b/projects/XCode4/iOSTest/iOSTest/TestObj.m
new file mode 100644
index 00000000..943f4450
--- /dev/null
+++ b/projects/XCode4/iOSTest/iOSTest/TestObj.m
@@ -0,0 +1,18 @@
+//
+//  TestObj.m
+//  OCTest
+//
+//  Created by Phil on 13/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)
+
+#import "TestObj.h"
+
+
+@implementation TestObj
+
+@synthesize int_val;
+
+@end