From 9c547fd161da80d7dc1506a0a01977764e4fabac Mon Sep 17 00:00:00 2001 From: dmaclach Date: Mon, 12 Nov 2018 07:58:42 -0800 Subject: Deprecate runloop spinning functionality for tests. (#191) It should all be replaced with XCTestExpectations. --- UnitTesting/GTMAppKitUnitTestingUtilities.h | 6 ++++-- UnitTesting/GTMFoundationUnitTestingUtilities.h | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'UnitTesting') diff --git a/UnitTesting/GTMAppKitUnitTestingUtilities.h b/UnitTesting/GTMAppKitUnitTestingUtilities.h index b3852ba..d27c77d 100644 --- a/UnitTesting/GTMAppKitUnitTestingUtilities.h +++ b/UnitTesting/GTMAppKitUnitTestingUtilities.h @@ -71,8 +71,10 @@ // Return YES if the runloop was stopped because [context shouldStop] returned // YES. - (BOOL)gtm_runUntilDate:(NSDate *)date - context:(id)context; + context:(id)context + NS_DEPRECATED(10.4, 10.8, 1.0, 7.0, "Please move to XCTestExpectations"); // Calls -gtm_runUntilDate:context: with the timeout date set to 60 seconds. -- (BOOL)gtm_runUpToSixtySecondsWithContext:(id)context; +- (BOOL)gtm_runUpToSixtySecondsWithContext:(id)context + NS_DEPRECATED(10.4, 10.8, 1.0, 7.0, "Please move to XCTestExpectations"); @end diff --git a/UnitTesting/GTMFoundationUnitTestingUtilities.h b/UnitTesting/GTMFoundationUnitTestingUtilities.h index 6706daf..2bc4b4b 100644 --- a/UnitTesting/GTMFoundationUnitTestingUtilities.h +++ b/UnitTesting/GTMFoundationUnitTestingUtilities.h @@ -89,16 +89,19 @@ // YES. - (BOOL)gtm_runUntilDate:(NSDate *)date mode:(NSString *)mode - context:(id)context; + context:(id)context + NS_DEPRECATED(10.4, 10.8, 1.0, 7.0, "Please move to XCTestExpectations"); // Calls -gtm_runUntilDate:mode:context: with mode set to NSDefaultRunLoopMode. - (BOOL)gtm_runUntilDate:(NSDate *)date - context:(id)context; + context:(id)context + NS_DEPRECATED(10.4, 10.8, 1.0, 7.0, "Please move to XCTestExpectations"); // Calls -gtm_runUntilDate:mode:context: with mode set to NSDefaultRunLoopMode, // and the timeout date set to |seconds| seconds. - (BOOL)gtm_runUpToNSeconds:(NSTimeInterval)seconds - context:(id)context; + context:(id)context + NS_DEPRECATED(10.4, 10.8, 1.0, 7.0, "Please move to XCTestExpectations"); // Calls -gtm_runUntilDate:mode:context: with mode set to NSDefaultRunLoopMode, // and the timeout date set to 60 seconds. @@ -106,6 +109,7 @@ // but may be a bit long for standard unit tests, and could cause a long unit // testing run if you have multiple failures. // Calling -[gtm_runUpToNSeconds:context:] is preferred. -- (BOOL)gtm_runUpToSixtySecondsWithContext:(id)context; +- (BOOL)gtm_runUpToSixtySecondsWithContext:(id)context + NS_DEPRECATED(10.4, 10.8, 1.0, 7.0, "Please move to XCTestExpectations"); @end -- cgit v1.2.3