aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2016-12-05 18:04:00 -0500
committerGravatar Thomas Van Lenten <thomasvl@google.com>2016-12-05 18:04:00 -0500
commita86965088edd3a754225f0d75cb6137c187c9265 (patch)
tree654dd650f5e5d60fe2170112cd624c44825ee33c
parent2ef3625a9193d4855931a73e0e5b3eb29d0231c3 (diff)
First pass removing all deprecated uses of GTM_IPHONE_USE_SENTEST.
SENTEST as a framework doesn't exist anymore so there's no point in supporting it.
-rw-r--r--GTMDefines.h9
-rw-r--r--ReleaseNotes.md5
-rw-r--r--UnitTesting/GTMIPhoneUnitTestMain.m5
-rw-r--r--UnitTesting/GTMSenTestCase.h27
-rw-r--r--UnitTesting/GTMSenTestCase.m4
5 files changed, 11 insertions, 39 deletions
diff --git a/GTMDefines.h b/GTMDefines.h
index 7baa7b2..8ec88cc 100644
--- a/GTMDefines.h
+++ b/GTMDefines.h
@@ -191,17 +191,9 @@
// By default, GTM has provided it's own unittesting support, define this
// to use the support provided by Xcode, especially for the Xcode4 support
// for unittesting.
- // This is going to be deprecated as Apple is deprecating SenTest.
- #ifndef GTM_IPHONE_USE_SENTEST
- #define GTM_IPHONE_USE_SENTEST 0
- #endif
- // Define this to use XCTest instead of OCUnit/SenTest.
#ifndef GTM_USING_XCTEST
#define GTM_USING_XCTEST 0
#endif
- #if GTM_IPHONE_USE_SENTEST && GTM_USING_XCTEST
- #error Can't define both GTM_IPHONE_USE_SENTEST and GTM_USING_XCTEST
- #endif
#define GTM_MACOS_SDK 0
#else
// For MacOS specific stuff
@@ -209,7 +201,6 @@
#define GTM_IPHONE_SDK 0
#define GTM_IPHONE_SIMULATOR 0
#define GTM_IPHONE_DEVICE 0
- #define GTM_IPHONE_USE_SENTEST 0
#ifndef GTM_USING_XCTEST
#define GTM_USING_XCTEST 0
#endif
diff --git a/ReleaseNotes.md b/ReleaseNotes.md
index 8d55d1a..eb247fe 100644
--- a/ReleaseNotes.md
+++ b/ReleaseNotes.md
@@ -28,9 +28,8 @@ Changes since 1.6.0<br>
has forced GTM into this model. By default the SDK will be set to the most
recent SDK installed.
-- Initial support for using the Xcode provided OCUnit/XCTest for unittesting on iOS.
- Define GTM_IPHONE_USE_SENTEST or GTM_USING_XCTEST to 1 to use this.
- GTM_IPHONE_USE_SENTEST is going to be deprecated shortly.
+- Initial support for using the Xcode provided XCTest for unittesting on iOS.
+ Define GTM_USING_XCTEST to 1 to use this.
- Removed support for Garbage Collection, leaving just the shell for other code
that might have depended on some of the constants/method GTM provided.
diff --git a/UnitTesting/GTMIPhoneUnitTestMain.m b/UnitTesting/GTMIPhoneUnitTestMain.m
index 0a504b7..1f4ca44 100644
--- a/UnitTesting/GTMIPhoneUnitTestMain.m
+++ b/UnitTesting/GTMIPhoneUnitTestMain.m
@@ -56,9 +56,8 @@ int main(int argc, char *argv[]) {
#else
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
#endif
-#if GTM_IPHONE_USE_SENTEST || GTM_USING_XCTEST
- // Is using SenTest or XCTest, just create a dummy app that can be used as the
- // TEST_HOST.
+#if GTM_USING_XCTEST
+ // Is using XCTest, just create a dummy app that can be used as the TEST_HOST.
retVal = UIApplicationMain(argc, argv, nil, nil);
#else
retVal = UIApplicationMain(argc, argv, nil, @"GTMIPhoneUnitTestDelegate");
diff --git a/UnitTesting/GTMSenTestCase.h b/UnitTesting/GTMSenTestCase.h
index 6b7198b..0bec7a6 100644
--- a/UnitTesting/GTMSenTestCase.h
+++ b/UnitTesting/GTMSenTestCase.h
@@ -61,29 +61,12 @@
#endif // GTM_USING_XCTEST
// We don't support our built in testing on MacOS since its always had sentest.
#elif GTM_IPHONE_SDK
- #if GTM_IPHONE_USE_SENTEST
- #import <SenTestingKit/SenTestingKit.h>
- #elif GTM_USING_XCTEST
+ #if GTM_USING_XCTEST
#import <XCTest/XCTest.h>
#else
#import <Foundation/Foundation.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if defined __clang__
- // gcc and gcc-llvm do not allow you to use STAssert(blah, nil) with nil
- // as a description if you have the NS_FORMAT_FUNCTION on.
- // clang however will not compile without warnings if you don't have it.
- NSString *STComposeString(NSString *, ...) NS_FORMAT_FUNCTION(1, 2);
- #else
- NSString *STComposeString(NSString *, ...);
- #endif // __clang__
-
- #ifdef __cplusplus
- }
- #endif
- #endif // GTM_IPHONE_USE_SENTEST
+ GTM_EXTERN NSString *STComposeString(NSString *, ...) NS_FORMAT_FUNCTION(1, 2);
+ #endif // GTM_USING_XCTEST
#endif // GTM_MACOS_SDK
#if GTM_USING_XCTEST
@@ -729,7 +712,7 @@ do { \
} while (0)
#endif // GTM_USING_XCTEST
-#if GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST && !GTM_USING_XCTEST
+#if GTM_IPHONE_SDK && !GTM_USING_XCTEST
// When not using the Xcode provided version, define everything ourselves.
// SENTE_BEGIN
@@ -1289,7 +1272,7 @@ GTM_EXTERN NSString *const SenTestFailureException;
GTM_EXTERN NSString *const SenTestFilenameKey;
GTM_EXTERN NSString *const SenTestLineNumberKey;
-#endif // GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST && !GTM_USING_XCTEST
+#endif // GTM_IPHONE_SDK && !GTM_USING_XCTEST
// All unittest cases in GTM should inherit from GTMTestCase. It makes sure
// to set up our logging system correctly to verify logging calls.
diff --git a/UnitTesting/GTMSenTestCase.m b/UnitTesting/GTMSenTestCase.m
index 5236c51..6d93451 100644
--- a/UnitTesting/GTMSenTestCase.m
+++ b/UnitTesting/GTMSenTestCase.m
@@ -25,7 +25,7 @@
#import <UIKit/UIKit.h>
#endif // GTM_IPHONE_SDK
-#if GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST && !GTM_USING_XCTEST
+#if GTM_IPHONE_SDK && !GTM_USING_XCTEST
#import <stdarg.h>
@interface NSException (GTMSenTestPrivateAdditions)
@@ -392,7 +392,7 @@ static NSInteger MethodSort(id a, id b, void *context) {
@end
-#endif // GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST
+#endif // GTM_IPHONE_SDK && !GTM_USING_XCTEST
@implementation GTMTestCase