From d160301ee824d8c77bcef4af3f8265c8cb376a7c Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Tue, 3 Nov 2015 10:07:41 -0500 Subject: Make gtm_runUntilDate:context: run on the runloop it is called on, not the current runloop of the caller. --- UnitTesting/GTMFoundationUnitTestingUtilities.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'UnitTesting') diff --git a/UnitTesting/GTMFoundationUnitTestingUtilities.m b/UnitTesting/GTMFoundationUnitTestingUtilities.m index 1fe5c5f..716b025 100644 --- a/UnitTesting/GTMFoundationUnitTestingUtilities.m +++ b/UnitTesting/GTMFoundationUnitTestingUtilities.m @@ -104,13 +104,12 @@ mode:(NSString *)mode context:(id)context { BOOL contextShouldStop = NO; - NSRunLoop *rl = [NSRunLoop currentRunLoop]; NSDate* next = nil; while (1) { contextShouldStop = [context shouldStop]; if (contextShouldStop) break; next = [[NSDate alloc] initWithTimeIntervalSinceNow:0.01]; - if (!([rl runMode:mode beforeDate:next])) break; + if (!([self runMode:mode beforeDate:next])) break; if ([next compare:date] == NSOrderedDescending) break; [next release]; next = nil; -- cgit v1.2.3