diff options
author | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-09-22 23:33:44 +0000 |
---|---|---|
committer | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-09-22 23:33:44 +0000 |
commit | 7bb8e9b9b24141f373ed70d7e6674a245c0227cf (patch) | |
tree | 8fab3cad46943aee24f213e041b2a7f6b71ea5df /Foundation | |
parent | bfaf8705cccb15c0c2a7704b17ba011ddba8242f (diff) |
- Added GTMTestTimer.h for doing high fidelity timings.
- Added leaks checking to iPhone unit test script. It can be controlled by
the GTM_DISABLE_LEAKS environment variable
- Added ability to control using zombies to iPhone unit test script. It can be
controlled by the GTM_DISABLE_ZOMBIES environment variable
- Added ability to control termination to iPhone unit test script. It can be
controlled by the GTM_DISABLE_TERMINATION environment variable
- Fixed several leaks found with leak checking enabled.
- Added configs for different iPhone OS versions.
Diffstat (limited to 'Foundation')
-rw-r--r-- | Foundation/GTMExceptionalInlines.h | 1 | ||||
-rw-r--r-- | Foundation/GTMExceptionalInlines.m | 4 | ||||
-rw-r--r-- | Foundation/GTMExceptionalInlinesTest.m | 6 | ||||
-rw-r--r-- | Foundation/GTMHTTPServer.m | 1 | ||||
-rw-r--r-- | Foundation/GTMPathTest.m | 1 | ||||
-rw-r--r-- | Foundation/GTMRegex.m | 2 |
6 files changed, 15 insertions, 0 deletions
diff --git a/Foundation/GTMExceptionalInlines.h b/Foundation/GTMExceptionalInlines.h index 25635c1..ce30db9 100644 --- a/Foundation/GTMExceptionalInlines.h +++ b/Foundation/GTMExceptionalInlines.h @@ -37,6 +37,7 @@ // functions where possible. FOUNDATION_EXPORT NSRange GTMNSMakeRange(NSUInteger loc, NSUInteger len); +FOUNDATION_EXPORT CFRange GTMCFRangeMake(NSUInteger loc, NSUInteger len); FOUNDATION_EXPORT CGPoint GTMCGPointMake(CGFloat x, CGFloat y); FOUNDATION_EXPORT CGSize GTMCGSizeMake(CGFloat width, CGFloat height); diff --git a/Foundation/GTMExceptionalInlines.m b/Foundation/GTMExceptionalInlines.m index 120e235..d803ea9 100644 --- a/Foundation/GTMExceptionalInlines.m +++ b/Foundation/GTMExceptionalInlines.m @@ -22,6 +22,10 @@ NSRange GTMNSMakeRange(NSUInteger loc, NSUInteger len) { return NSMakeRange(loc, len); } +CFRange GTMCFRangeMake(NSUInteger loc, NSUInteger len) { + return CFRangeMake(loc, len); +} + CGPoint GTMCGPointMake(CGFloat x, CGFloat y) { return CGPointMake(x, y); } diff --git a/Foundation/GTMExceptionalInlinesTest.m b/Foundation/GTMExceptionalInlinesTest.m index f785301..6142236 100644 --- a/Foundation/GTMExceptionalInlinesTest.m +++ b/Foundation/GTMExceptionalInlinesTest.m @@ -35,6 +35,12 @@ NSRange range1 = GTMNSMakeRange(loc, len); NSRange range2 = NSMakeRange(loc, len); STAssertTrue(NSEqualRanges(range1, range2), nil); + + CFRange cfrange1 = GTMCFRangeMake(loc, len); + CFRange cfrange2 = CFRangeMake(loc, len); + STAssertEquals(cfrange1.length, cfrange2.length, nil); + STAssertEquals(cfrange1.location, cfrange2.location, nil); + CGPoint cgpoint1 = GTMCGPointMake(x, y); CGPoint cgpoint2 = CGPointMake(x, y); diff --git a/Foundation/GTMHTTPServer.m b/Foundation/GTMHTTPServer.m index ffa294c..ecd649c 100644 --- a/Foundation/GTMHTTPServer.m +++ b/Foundation/GTMHTTPServer.m @@ -90,6 +90,7 @@ static NSString *kResponse = @"Response"; - (void)dealloc { [self stop]; + [connections_ release]; [super dealloc]; } diff --git a/Foundation/GTMPathTest.m b/Foundation/GTMPathTest.m index 0570bb3..3a60ea7 100644 --- a/Foundation/GTMPathTest.m +++ b/Foundation/GTMPathTest.m @@ -51,6 +51,7 @@ #else [[NSFileManager defaultManager] removeItemAtPath:testDirectory_ error:NULL]; #endif + [testDirectory_ release]; } - (void)testBasicCreation { diff --git a/Foundation/GTMRegex.m b/Foundation/GTMRegex.m index c142c62..33c5b25 100644 --- a/Foundation/GTMRegex.m +++ b/Foundation/GTMRegex.m @@ -674,6 +674,8 @@ static NSString *const kReplacementPattern = - (id)init { // make sure init is never called, the class in in the header so someone // could try to create it by mistake. + // Call super init and release so we don't leak + [[super init] autorelease]; [self doesNotRecognizeSelector:_cmd]; return nil; // COV_NF_LINE - return is just here to keep gcc happy } |