diff options
author | thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-04-14 17:21:02 +0000 |
---|---|---|
committer | thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-04-14 17:21:02 +0000 |
commit | cdf070c8d76ffc4eaa24e8671756cbbe9ceb2890 (patch) | |
tree | faa9ae3a72a6591d6a6add7ceed7f91e92ade11f /Foundation/GTMObjectSingleton.h | |
parent | 0aaecac6ff2bc89e58a0c8c6d6ad62e02fb2b011 (diff) |
See the ReleaseNotes for the full details, highlights:
- bug fixes
- code coverage support
- more complete unittests
- full support for unittesting UIs
- support for the iphone sdk (include ui unittesting)
Diffstat (limited to 'Foundation/GTMObjectSingleton.h')
-rw-r--r-- | Foundation/GTMObjectSingleton.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Foundation/GTMObjectSingleton.h b/Foundation/GTMObjectSingleton.h index 9bdeb0a..116d232 100644 --- a/Foundation/GTMObjectSingleton.h +++ b/Foundation/GTMObjectSingleton.h @@ -17,6 +17,8 @@ // the License. // +#import "GTMDefines.h" + /// This macro implements the various methods needed to make a safe singleton. // /// This Singleton pattern was taken from: @@ -35,7 +37,7 @@ static _object_name_ *z##_shared_obj_name_ = nil; \ /* Note that 'self' may not be the same as _object_name_ */ \ /* first assignment done in allocWithZone but we must reassign in case init fails */ \ z##_shared_obj_name_ = [[self alloc] init]; \ - NSAssert((z##_shared_obj_name_ != nil), @"didn't catch singleton allocation"); \ + _GTMDevAssert((z##_shared_obj_name_ != nil), @"didn't catch singleton allocation"); \ } \ } \ return z##_shared_obj_name_; \ @@ -49,7 +51,7 @@ static _object_name_ *z##_shared_obj_name_ = nil; \ } \ \ /* We can't return the shared instance, because it's been init'd */ \ - NSAssert(NO, @"use the singleton API, not alloc+init"); \ + _GTMDevAssert(NO, @"use the singleton API, not alloc+init"); \ return nil; \ } \ - (id)retain { \ |