From 80d89e2959b524c2ba799bc084308a56feb8da2d Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Wed, 15 Aug 2012 12:00:29 +0000 Subject: [Author: grobbins] Add a reset method to the boolean run loop context since, between tests, [context reset] looks more natural than [context setShouldStop:NO] and is more concise than allocating a new context. R=thomasvl APPROVED=dmaclach DELTA=5 (5 added, 0 deleted, 0 changed) --- UnitTesting/GTMFoundationUnitTestingUtilities.h | 1 + UnitTesting/GTMFoundationUnitTestingUtilities.m | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'UnitTesting') diff --git a/UnitTesting/GTMFoundationUnitTestingUtilities.h b/UnitTesting/GTMFoundationUnitTestingUtilities.h index efbfba5..cd37bc6 100644 --- a/UnitTesting/GTMFoundationUnitTestingUtilities.h +++ b/UnitTesting/GTMFoundationUnitTestingUtilities.h @@ -72,6 +72,7 @@ + (id)context; - (BOOL)shouldStop; - (void)setShouldStop:(BOOL)stop; +- (void)reset; @end // Some category methods to simplify spinning the runloops in such a way as diff --git a/UnitTesting/GTMFoundationUnitTestingUtilities.m b/UnitTesting/GTMFoundationUnitTestingUtilities.m index 2f278d7..034c3c0 100644 --- a/UnitTesting/GTMFoundationUnitTestingUtilities.m +++ b/UnitTesting/GTMFoundationUnitTestingUtilities.m @@ -73,6 +73,10 @@ shouldStop_ = stop; } +- (void)reset { + shouldStop_ = NO; +} + @end @implementation NSRunLoop (GTMUnitTestingAdditions) -- cgit v1.2.3