From a86965088edd3a754225f0d75cb6137c187c9265 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 5 Dec 2016 18:04:00 -0500 Subject: 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. --- GTMDefines.h | 9 --------- ReleaseNotes.md | 5 ++--- UnitTesting/GTMIPhoneUnitTestMain.m | 5 ++--- UnitTesting/GTMSenTestCase.h | 27 +++++---------------------- UnitTesting/GTMSenTestCase.m | 4 ++-- 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
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 - #elif GTM_USING_XCTEST + #if GTM_USING_XCTEST #import #else #import - #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 #endif // GTM_IPHONE_SDK -#if GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST && !GTM_USING_XCTEST +#if GTM_IPHONE_SDK && !GTM_USING_XCTEST #import @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 -- cgit v1.2.3