diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2015-11-03 10:07:41 -0500 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2015-11-03 10:07:41 -0500 |
commit | d160301ee824d8c77bcef4af3f8265c8cb376a7c (patch) | |
tree | 804996f7e969830d707d50f8b3ef8b002052c389 /UnitTesting | |
parent | 38d47a6043ca39b534faca210b91bbc15c4b64af (diff) |
Make gtm_runUntilDate:context: run on the runloop it is called on, not the current runloop of the caller.
Diffstat (limited to 'UnitTesting')
-rw-r--r-- | UnitTesting/GTMFoundationUnitTestingUtilities.m | 3 |
1 files changed, 1 insertions, 2 deletions
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<GTMUnitTestingRunLoopContext>)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; |