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. --- UnitTesting/GTMIPhoneUnitTestMain.m | 5 ++--- UnitTesting/GTMSenTestCase.h | 27 +++++---------------------- UnitTesting/GTMSenTestCase.m | 4 ++-- 3 files changed, 9 insertions(+), 27 deletions(-) (limited to 'UnitTesting') 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