diff options
-rw-r--r-- | AppKit/GTMNSWorkspace+ScreenSaver.h | 33 | ||||
-rw-r--r-- | AppKit/GTMNSWorkspace+ScreenSaver.m | 132 | ||||
-rw-r--r-- | AppKit/GTMNSWorkspace+ScreenSaverTest.m | 33 | ||||
-rw-r--r-- | Foundation/GTMBase64.m | 4 | ||||
-rw-r--r-- | Foundation/GTMHTTPFetcher.h | 8 | ||||
-rw-r--r-- | Foundation/GTMHTTPFetcher.m | 29 | ||||
-rw-r--r-- | Foundation/GTMHTTPFetcherTest.m | 18 | ||||
-rw-r--r-- | Foundation/GTMValidatingContainersTest.m | 14 | ||||
-rw-r--r-- | GTM.xcodeproj/project.pbxproj | 64 | ||||
-rw-r--r-- | GTMDefines.h | 2 | ||||
-rw-r--r-- | GTM_Prefix.pch | 3 | ||||
-rw-r--r-- | GTMiPhone.xcodeproj/project.pbxproj | 8 | ||||
-rw-r--r-- | ReleaseNotes.txt | 18 | ||||
-rw-r--r-- | UnitTesting/GTMDevLogUnitTestingBridge.m (renamed from DebugUtils/GTMDevLog.m) | 20 | ||||
-rw-r--r-- | UnitTesting/GTMSenTestCase.h | 2 |
15 files changed, 147 insertions, 241 deletions
diff --git a/AppKit/GTMNSWorkspace+ScreenSaver.h b/AppKit/GTMNSWorkspace+ScreenSaver.h deleted file mode 100644 index adaaf8d..0000000 --- a/AppKit/GTMNSWorkspace+ScreenSaver.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// GTMNSWorkspace+ScreenSaver.h -// -// Category for seeing if the screen saver is running. -// Requires linkage with the ScreenSaver.framework. Warning, uses some -// undocumented methods in the ScreenSaver.framework. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import <Cocoa/Cocoa.h> - -@interface NSWorkspace (GTMScreenSaverAddition) - -// Check if the screen saver is running. -// Returns YES if it is running. -// Requires linking to the ScreenSaver.framework. -+ (BOOL)gtm_isScreenSaverActive; - -@end - diff --git a/AppKit/GTMNSWorkspace+ScreenSaver.m b/AppKit/GTMNSWorkspace+ScreenSaver.m deleted file mode 100644 index 7ca5d70..0000000 --- a/AppKit/GTMNSWorkspace+ScreenSaver.m +++ /dev/null @@ -1,132 +0,0 @@ -// -// GTMNSWorkspace+ScreenSaver.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import <Carbon/Carbon.h> -#import <ScreenSaver/ScreenSaver.h> -#import "GTMNSWorkspace+ScreenSaver.h" -#import "GTMDefines.h" -#import "GTMGarbageCollection.h" - -// Interesting class descriptions extracted from ScreenSaver.framework using -// class-dump. Note that these are "not documented". - -@protocol ScreenSaverControl - -- (BOOL)screenSaverIsRunning; -- (BOOL)screenSaverCanRun; -- (void)setScreenSaverCanRun:(BOOL)fp8; -- (void)screenSaverStartNow; -- (void)screenSaverStopNow; -- (void)restartForUser:(id)fp8; -- (double)screenSaverTimeRemaining; -- (void)screenSaverDidFade; -- (BOOL)screenSaverIsRunningInBackground; -- (void)screenSaverDidFadeInBackground:(BOOL)fp8 - psnHi:(unsigned int)fp12 - psnLow:(unsigned int)fp16; - -@end - -@interface ScreenSaverController : NSObject <ScreenSaverControl> { - NSConnection *_connection; - id _daemonProxy; - void *_reserved; -} - -+ (id)controller; -+ (id)monitor; -+ (id)daemonConnectionName; -+ (id)enginePath; -- (void)_connectionClosed:(id)fp8; -- (id)init; -- (void)dealloc; -- (BOOL)screenSaverIsRunning; -- (BOOL)screenSaverCanRun; -- (void)setScreenSaverCanRun:(BOOL)fp8; -- (void)screenSaverStartNow; -- (void)screenSaverStopNow; -- (void)restartForUser:(id)fp8; -- (double)screenSaverTimeRemaining; -- (void)screenSaverDidFade; -- (BOOL)screenSaverIsRunningInBackground; -- (void)screenSaverDidFadeInBackground:(BOOL)fp8 - psnHi:(unsigned int)fp12 - psnLow:(unsigned int)fp16; - -@end - -// end of extraction - -@implementation NSWorkspace (GTMScreenSaverAddition) -// Check if the screen saver is running. -+ (BOOL)gtm_isScreenSaverActive { - BOOL answer = NO; - ScreenSaverController *controller = nil; - // We're calling into an "undocumented" framework here, so we are going to - // step rather carefully (and in 10.5.2 it's only 32bit). - -#if !__LP64__ - Class screenSaverControllerClass = NSClassFromString(@"ScreenSaverController"); - _GTMDevAssert(screenSaverControllerClass, - @"Are you linked with ScreenSaver.framework?" - " Can't find ScreenSaverController class."); - if ([screenSaverControllerClass respondsToSelector:@selector(controller)]) { - controller = [ScreenSaverController controller]; - if (controller) { - if ([controller respondsToSelector:@selector(screenSaverIsRunning)]) { - answer = [controller screenSaverIsRunning]; - } else { - // COV_NF_START - _GTMDevLog(@"ScreenSaverController no longer supports -screenSaverIsRunning?"); - controller = nil; - // COV_NF_END - } - } - } -#endif // !__LP64__ - - if (!controller) { - // COV_NF_START - // If we can't get the controller, chances are we are being run from the - // command line and don't have access to the window server. As such we are - // going to fallback to the older method of figuring out if a screen saver - // is running. - ProcessSerialNumber psn; - // Check if the saver is already running - require_noerr(GetFrontProcess(&psn), CantGetFrontProcess); - - CFDictionaryRef cfProcessInfo - = ProcessInformationCopyDictionary(&psn, - kProcessDictionaryIncludeAllInformationMask); - - require(cfProcessInfo, CantGetFrontProcess); - NSDictionary *processInfo = [GTMNSMakeCollectable(cfProcessInfo) autorelease]; - NSString *bundlePath = [processInfo objectForKey:@"BundlePath"]; - - // ScreenSaverEngine is the frontmost app if the screen saver is actually - // running Security Agent is the frontmost app if the "enter password" - // dialog is showing - answer = [bundlePath hasSuffix:@"ScreenSaverEngine.app"] || - [bundlePath hasSuffix:@"SecurityAgent.app"]; - // COV_NF_END - } -CantGetFrontProcess: - return answer; -} - -@end diff --git a/AppKit/GTMNSWorkspace+ScreenSaverTest.m b/AppKit/GTMNSWorkspace+ScreenSaverTest.m deleted file mode 100644 index 923efe9..0000000 --- a/AppKit/GTMNSWorkspace+ScreenSaverTest.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// GTMNSWorkspace+ScreenSaverTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// -#import "GTMSenTestCase.h" -#import "GTMNSWorkspace+ScreenSaver.h" - -@interface GTMNSWorkspace_ScreenSaverTest : GTMTestCase -@end - - -@implementation GTMNSWorkspace_ScreenSaverTest - -- (void)testIsScreenSaverActive { - // Not much of a test, just executes the code. Couldn't think of a - // good way of verifying this one. - [NSWorkspace gtm_isScreenSaverActive]; -} - -@end diff --git a/Foundation/GTMBase64.m b/Foundation/GTMBase64.m index 06d0414..03914fd 100644 --- a/Foundation/GTMBase64.m +++ b/Foundation/GTMBase64.m @@ -147,7 +147,7 @@ static const char kWebSafeBase64DecodeChars[] = { }; -// Tests a charact to see if it's a whitespace character. +// Tests a character to see if it's a whitespace character. // // Returns: // YES if the character is a whitespace character. @@ -203,7 +203,7 @@ FOUNDATION_STATIC_INLINE NSUInteger CalcEncodedLength(NSUInteger srcLen, } // Tries to calculate how long the data will be once it's base64 decoded. -// Unlinke the above, this is always an upperbound, since the source data +// Unlike the above, this is always an upperbound, since the source data // could have spaces and might end with the padding characters on them. // // Returns: diff --git a/Foundation/GTMHTTPFetcher.h b/Foundation/GTMHTTPFetcher.h index bd9c70e..fadd9b0 100644 --- a/Foundation/GTMHTTPFetcher.h +++ b/Foundation/GTMHTTPFetcher.h @@ -248,6 +248,7 @@ typedef NSUInteger GTMHTTPFetcherCookieStorageMethod; SEL failedSEL_; // should be implemented by delegate SEL receivedDataSEL_; // optional, set with setReceivedDataSelector id userData_; // retained, if set by caller + NSMutableDictionary *properties_; // more data retained for caller NSArray *runLoopModes_; // optional, for 10.5 and later NSMutableDictionary *fetchHistory_; // if supplied by the caller, used for Last-Modified-Since checks and cookies BOOL shouldCacheDatedData_; // if true, remembers and returns data marked with a last-modified date @@ -429,6 +430,13 @@ typedef NSUInteger GTMHTTPFetcherCookieStorageMethod; - (id)userData; - (void)setUserData:(id)theObj; +// properties are retained for the convenience of the caller +- (void)setProperties:(NSDictionary *)dict; +- (NSDictionary *)properties; + +- (void)setProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property +- (id)propertyForKey:(NSString *)key; + // using the fetcher while a modal dialog is displayed requires setting the // run-loop modes to include NSModalPanelRunLoopMode // diff --git a/Foundation/GTMHTTPFetcher.m b/Foundation/GTMHTTPFetcher.m index cac49df..96fa337 100644 --- a/Foundation/GTMHTTPFetcher.m +++ b/Foundation/GTMHTTPFetcher.m @@ -112,6 +112,7 @@ const NSTimeInterval kDefaultMaxRetryInterval = 60. * 10.; // 10 minutes [loggedStreamData_ release]; [response_ release]; [userData_ release]; + [properties_ release]; [runLoopModes_ release]; [fetchHistory_ release]; [self destroyRetryTimer]; @@ -507,13 +508,13 @@ CannotBeginFetch: } } - // If we don't have credentials, or we've already failed auth 3x... - [[challenge sender] cancelAuthenticationChallenge:challenge]; - + // If we don't have credentials, or we've already failed auth 3x, give up and // report the error, putting the challenge as a value in the userInfo // dictionary + // Store the challenge first to ensure that it lives past being cancelled. NSDictionary *userInfo = [NSDictionary dictionaryWithObject:challenge forKey:kGTMHTTPFetcherErrorChallengeKey]; + [[challenge sender] cancelAuthenticationChallenge:challenge]; NSError *error = [NSError errorWithDomain:kGTMHTTPFetcherErrorDomain code:kGTMHTTPFetcherErrorAuthenticationChallengeFailed @@ -1001,6 +1002,28 @@ CannotBeginFetch: userData_ = [theObj retain]; } +- (void)setProperties:(NSDictionary *)dict { + [properties_ autorelease]; + properties_ = [dict mutableCopy]; +} + +- (NSDictionary *)properties { + return properties_; +} + +- (void)setProperty:(id)obj forKey:(NSString *)key { + + if (properties_ == nil && obj != nil) { + properties_ = [[NSMutableDictionary alloc] init]; + } + + [properties_ setValue:obj forKey:key]; +} + +- (id)propertyForKey:(NSString *)key { + return [properties_ objectForKey:key]; +} + - (NSArray *)runLoopModes { return runLoopModes_; } diff --git a/Foundation/GTMHTTPFetcherTest.m b/Foundation/GTMHTTPFetcherTest.m index 3722e9b..6bb99a1 100644 --- a/Foundation/GTMHTTPFetcherTest.m +++ b/Foundation/GTMHTTPFetcherTest.m @@ -108,7 +108,8 @@ static NSString *const kValidFileName = @"GTMHTTPFetcherTestPage.html"; NSString *urlString = [self fileURLStringToTestFileName:kValidFileName]; - [self doFetchWithURLString:urlString cachingDatedData:YES]; + GTMHTTPFetcher *fetcher = + [self doFetchWithURLString:urlString cachingDatedData:YES]; STAssertNotNil(fetchedData_, @"failed to fetch data, status:%ld error:%@, URL:%@", @@ -138,6 +139,21 @@ static NSString *const kValidFileName = @"GTMHTTPFetcherTestPage.html"; NSString *cookieExpected = [NSString stringWithFormat:@"TestCookie=%@", kValidFileName]; STAssertEqualObjects(cookiesSetString, cookieExpected, @"Unexpected cookie"); + + // test properties + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: + @"val1", @"key1", @"val2", @"key2", nil]; + [fetcher setProperties:dict]; + STAssertEqualObjects([fetcher properties], dict, @"properties as dictionary"); + STAssertEqualObjects([fetcher propertyForKey:@"key2"], @"val2", + @"single property"); + + NSDictionary *dict2 = [NSDictionary dictionaryWithObjectsAndKeys: + @"valx1", @"key1", @"val3", @"key3", nil]; + [fetcher setProperty:@"valx1" forKey:@"key1"]; + [fetcher setProperty:nil forKey:@"key2"]; + [fetcher setProperty:@"val3" forKey:@"key3"]; + STAssertEqualObjects([fetcher properties], dict2, @"property changes"); // make a copy of the fetched data to compare with our next fetch from the // cache diff --git a/Foundation/GTMValidatingContainersTest.m b/Foundation/GTMValidatingContainersTest.m index a819787..ed17327 100644 --- a/Foundation/GTMValidatingContainersTest.m +++ b/Foundation/GTMValidatingContainersTest.m @@ -32,13 +32,16 @@ - (void)foo; @end -@interface GTMVCValidatorTests : GTMTestCase { +@interface GTMVCValidatingTests : GTMTestCase { GTMVCTestClass *testClass_; GTMVCTestSubClass *testSubClass_; } +@end + +@interface GTMVCValidatorTests : GTMVCValidatingTests @end -@interface GTMVCContainerTests : GTMVCValidatorTests { +@interface GTMVCContainerTests : GTMVCValidatingTests { GTMConformsToProtocolValidator *validator_; SEL selector_; } @@ -88,7 +91,8 @@ } @end -@implementation GTMVCValidatorTests +@implementation GTMVCValidatingTests + - (void)setUp { [super setUp]; testClass_ = [[GTMVCTestClass alloc] init]; @@ -101,6 +105,10 @@ [super tearDown]; } +@end + +@implementation GTMVCValidatorTests + - (void)testKindOfClassValidator { #if GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT [GTMUnitTestDevLog expectString:@"nil class"]; diff --git a/GTM.xcodeproj/project.pbxproj b/GTM.xcodeproj/project.pbxproj index 087b886..84e068a 100644 --- a/GTM.xcodeproj/project.pbxproj +++ b/GTM.xcodeproj/project.pbxproj @@ -49,10 +49,6 @@ 8B1801B20E25341B00280961 /* GTMLargeTypeWindowLongTextTest.gtmUTState in Resources */ = {isa = PBXBuildFile; fileRef = 8B1801AC0E25341B00280961 /* GTMLargeTypeWindowLongTextTest.gtmUTState */; }; 8B1801B30E25341B00280961 /* GTMLargeTypeWindowShortTextTest.gtmUTState in Resources */ = {isa = PBXBuildFile; fileRef = 8B1801AD0E25341B00280961 /* GTMLargeTypeWindowShortTextTest.gtmUTState */; }; 8B1802420E25592200280961 /* GTMLargeTypeWindowMediumTextTest.gtmUTState in Resources */ = {isa = PBXBuildFile; fileRef = 8B1802410E25592200280961 /* GTMLargeTypeWindowMediumTextTest.gtmUTState */; }; - 8B2A9B200D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2A9B1D0D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.m */; }; - 8B2A9B220D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B2A9B1F0D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8B2A9B240D8270DA00599386 /* GTMNSWorkspace+ScreenSaverTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2A9B1E0D8270DA00599386 /* GTMNSWorkspace+ScreenSaverTest.m */; }; - 8B2A9BEC0D82714A00599386 /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B2A9BEB0D82714A00599386 /* ScreenSaver.framework */; }; 8B2C21B50E00883F00B5ECB1 /* GTMObjC2Runtime.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6F32040DA34A1B0052CA40 /* GTMObjC2Runtime.m */; }; 8B2C21B60E00884000B5ECB1 /* GTMObjC2Runtime.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6F32040DA34A1B0052CA40 /* GTMObjC2Runtime.m */; }; 8B2C21B70E00885600B5ECB1 /* GTMObjC2Runtime.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6F32040DA34A1B0052CA40 /* GTMObjC2Runtime.m */; }; @@ -101,14 +97,14 @@ 8B7DCBD20DFF16070017E983 /* GTMNSAppleScript+Handler.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B3344180DBF7A36009FD32C /* GTMNSAppleScript+Handler.m */; }; 8B7DCBD30DFF16070017E983 /* GTMNSAppleEventDescriptor+Handler.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B33441B0DBF7A36009FD32C /* GTMNSAppleEventDescriptor+Handler.m */; }; 8B7DCBD40DFF16070017E983 /* GTMNSAppleEventDescriptor+Foundation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B33441E0DBF7A36009FD32C /* GTMNSAppleEventDescriptor+Foundation.m */; }; - 8B7DCBE20DFF18720017E983 /* GTMDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCBE10DFF18720017E983 /* GTMDevLog.m */; }; + 8B7DCBE20DFF18720017E983 /* GTMDevLogUnitTestingBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCBE10DFF18720017E983 /* GTMDevLogUnitTestingBridge.m */; }; 8B7DCBED0DFF1A4F0017E983 /* GTMUnitTestDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCBEC0DFF1A4F0017E983 /* GTMUnitTestDevLog.m */; }; 8B7DCBEE0DFF1A4F0017E983 /* GTMUnitTestDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCBEC0DFF1A4F0017E983 /* GTMUnitTestDevLog.m */; }; 8B7DCBEF0DFF1A4F0017E983 /* GTMUnitTestDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCBEC0DFF1A4F0017E983 /* GTMUnitTestDevLog.m */; }; 8B7DCE190DFF39850017E983 /* GTMSenTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCE180DFF39850017E983 /* GTMSenTestCase.m */; }; 8B7DCE1A0DFF39850017E983 /* GTMSenTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCE180DFF39850017E983 /* GTMSenTestCase.m */; }; 8B7DCE1B0DFF39850017E983 /* GTMSenTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCE180DFF39850017E983 /* GTMSenTestCase.m */; }; - 8B7DCEF10E002C210017E983 /* GTMDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCBE10DFF18720017E983 /* GTMDevLog.m */; }; + 8B7DCEF10E002C210017E983 /* GTMDevLogUnitTestingBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCBE10DFF18720017E983 /* GTMDevLogUnitTestingBridge.m */; }; 8B7E35750E048E2D00EF70C8 /* GTMHTTPFetcherTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F435E3930DC8CAAF0069CDE8 /* GTMHTTPFetcherTest.m */; }; 8BC045C20DAE899100C2D1CA /* GTMGeometryUtilsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F48FE2800D198D0E009257D2 /* GTMGeometryUtilsTest.m */; }; 8BC046B90DAE8C4B00C2D1CA /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BC046B80DAE8C4B00C2D1CA /* ApplicationServices.framework */; }; @@ -211,6 +207,15 @@ F4BC22D10DE4C39000108B7D /* GTMTestHTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = F4BC22D00DE4C39000108B7D /* GTMTestHTTPServer.m */; }; F4CA854F0DAFAAF600B4AB10 /* GTMObjC2Runtime.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B6F32060DA34A1B0052CA40 /* GTMObjC2Runtime.h */; settings = {ATTRIBUTES = (Public, ); }; }; F4FF22780D9D4835003880AC /* GTMDebugSelectorValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = F4FF22770D9D4835003880AC /* GTMDebugSelectorValidation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F92B9FA80E2E64B900A2FE61 /* GTMLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = F98680AF0E2C15C300CEE8BF /* GTMLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F92B9FA90E2E64BC00A2FE61 /* GTMLogger+ASL.h in Headers */ = {isa = PBXBuildFile; fileRef = F98681670E2C1E3A00CEE8BF /* GTMLogger+ASL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F95803F90E2FB0850049A088 /* GTMLoggerRingBufferWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = F95803F70E2FB0760049A088 /* GTMLoggerRingBufferWriter.m */; }; + F95803FA0E2FB08F0049A088 /* GTMLoggerRingBufferWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = F95803F60E2FB0760049A088 /* GTMLoggerRingBufferWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F95803FB0E2FB0A80049A088 /* GTMLoggerRingBufferWriterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F95803F80E2FB0760049A088 /* GTMLoggerRingBufferWriterTest.m */; }; + F98680C30E2C163D00CEE8BF /* GTMLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = F98680B00E2C15C300CEE8BF /* GTMLogger.m */; }; + F98680C40E2C164300CEE8BF /* GTMLoggerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F98680B10E2C15C300CEE8BF /* GTMLoggerTest.m */; }; + F98681960E2C20C100CEE8BF /* GTMLogger+ASLTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F98681950E2C20C100CEE8BF /* GTMLogger+ASLTest.m */; }; + F98681970E2C20C800CEE8BF /* GTMLogger+ASL.m in Sources */ = {isa = PBXBuildFile; fileRef = F98681680E2C1E3A00CEE8BF /* GTMLogger+ASL.m */; }; F9FD94630E1D31280005867E /* GTMPath.m in Sources */ = {isa = PBXBuildFile; fileRef = F9FD945C0E1D30F80005867E /* GTMPath.m */; }; F9FD94640E1D312E0005867E /* GTMPathTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F9FD945D0E1D30F80005867E /* GTMPathTest.m */; }; F9FD94CD0E1D50450005867E /* GTMPath.h in Headers */ = {isa = PBXBuildFile; fileRef = F9FD945E0E1D30F80005867E /* GTMPath.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -296,10 +301,6 @@ 8B1A14E90D900BC800CA1E8E /* GTMNSObject+BindingUnitTesting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSObject+BindingUnitTesting.m"; sourceTree = "<group>"; }; 8B1A14EA0D900BC800CA1E8E /* GTMNSObject+BindingUnitTesting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSObject+BindingUnitTesting.h"; sourceTree = "<group>"; }; 8B1A16050D90344B00CA1E8E /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMDefines.h; sourceTree = "<group>"; }; - 8B2A9B1D0D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSWorkspace+ScreenSaver.m"; sourceTree = "<group>"; }; - 8B2A9B1E0D8270DA00599386 /* GTMNSWorkspace+ScreenSaverTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSWorkspace+ScreenSaverTest.m"; sourceTree = "<group>"; }; - 8B2A9B1F0D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSWorkspace+ScreenSaver.h"; sourceTree = "<group>"; }; - 8B2A9BEB0D82714A00599386 /* ScreenSaver.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScreenSaver.framework; path = /System/Library/Frameworks/ScreenSaver.framework; sourceTree = "<absolute>"; }; 8B3344170DBF7A36009FD32C /* GTMNSAppleScript+HandlerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSAppleScript+HandlerTest.m"; sourceTree = "<group>"; }; 8B3344180DBF7A36009FD32C /* GTMNSAppleScript+Handler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSAppleScript+Handler.m"; sourceTree = "<group>"; }; 8B3344190DBF7A36009FD32C /* GTMNSAppleScript+Handler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSAppleScript+Handler.h"; sourceTree = "<group>"; }; @@ -341,7 +342,7 @@ 8B7AD4980DABBB5800B84F4A /* GTMNSBezierPath+CGPathTest.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "GTMNSBezierPath+CGPathTest.tiff"; sourceTree = "<group>"; }; 8B7AD4990DABBB5800B84F4A /* GTMNSBezierPath+RoundRectTest.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "GTMNSBezierPath+RoundRectTest.tiff"; sourceTree = "<group>"; }; 8B7AD4AD0DABBFEE00B84F4A /* GTMUnitTestingBindingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMUnitTestingBindingTest.m; sourceTree = "<group>"; }; - 8B7DCBE10DFF18720017E983 /* GTMDevLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMDevLog.m; sourceTree = "<group>"; }; + 8B7DCBE10DFF18720017E983 /* GTMDevLogUnitTestingBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMDevLogUnitTestingBridge.m; sourceTree = "<group>"; }; 8B7DCBEC0DFF1A4F0017E983 /* GTMUnitTestDevLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMUnitTestDevLog.m; sourceTree = "<group>"; }; 8B7DCBF00DFF1A610017E983 /* GTMUnitTestDevLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMUnitTestDevLog.h; sourceTree = "<group>"; }; 8B7DCE180DFF39850017E983 /* GTMSenTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMSenTestCase.m; sourceTree = "<group>"; }; @@ -461,6 +462,15 @@ F4CA864D0DB3ACD200B4AB10 /* SharedLibraryGCSupported.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = SharedLibraryGCSupported.xcconfig; sourceTree = "<group>"; }; F4CA864E0DB3ACD200B4AB10 /* StaticLibraryGCSupported.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = StaticLibraryGCSupported.xcconfig; sourceTree = "<group>"; }; F4FF22770D9D4835003880AC /* GTMDebugSelectorValidation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMDebugSelectorValidation.h; sourceTree = "<group>"; }; + F95803F60E2FB0760049A088 /* GTMLoggerRingBufferWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMLoggerRingBufferWriter.h; sourceTree = "<group>"; }; + F95803F70E2FB0760049A088 /* GTMLoggerRingBufferWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMLoggerRingBufferWriter.m; sourceTree = "<group>"; }; + F95803F80E2FB0760049A088 /* GTMLoggerRingBufferWriterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMLoggerRingBufferWriterTest.m; sourceTree = "<group>"; }; + F98680AF0E2C15C300CEE8BF /* GTMLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMLogger.h; sourceTree = "<group>"; }; + F98680B00E2C15C300CEE8BF /* GTMLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMLogger.m; sourceTree = "<group>"; }; + F98680B10E2C15C300CEE8BF /* GTMLoggerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMLoggerTest.m; sourceTree = "<group>"; }; + F98681670E2C1E3A00CEE8BF /* GTMLogger+ASL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMLogger+ASL.h"; sourceTree = "<group>"; }; + F98681680E2C1E3A00CEE8BF /* GTMLogger+ASL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMLogger+ASL.m"; sourceTree = "<group>"; }; + F98681950E2C20C100CEE8BF /* GTMLogger+ASLTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMLogger+ASLTest.m"; sourceTree = "<group>"; }; F9FD945C0E1D30F80005867E /* GTMPath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMPath.m; sourceTree = "<group>"; }; F9FD945D0E1D30F80005867E /* GTMPathTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMPathTest.m; sourceTree = "<group>"; }; F9FD945E0E1D30F80005867E /* GTMPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMPath.h; sourceTree = "<group>"; }; @@ -506,7 +516,6 @@ F42E095E0D199BD600D5DDE0 /* Cocoa.framework in Frameworks */, F42E09AE0D19A62F00D5DDE0 /* Carbon.framework in Frameworks */, F43E4F6D0D4E60C50041161F /* libz.dylib in Frameworks */, - 8B2A9BEC0D82714A00599386 /* ScreenSaver.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -561,7 +570,6 @@ children = ( 8B45A1990DA46AAA001148C5 /* QuartzCore.framework */, F43E4F6C0D4E60C50041161F /* libz.dylib */, - 8B2A9BEB0D82714A00599386 /* ScreenSaver.framework */, 0867D6A5FE840307C02AAC07 /* AppKit.framework */, F42E09AD0D19A62F00D5DDE0 /* Carbon.framework */, 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */, @@ -664,9 +672,6 @@ F47F1C0E0D490BC000925B8F /* GTMNSBezierPath+Shading.m */, F47F1C110D490BC000925B8F /* GTMNSBezierPath+ShadingTest.m */, F47F1C740D490E5C00925B8F /* GTMShading.h */, - 8B2A9B1D0D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.m */, - 8B2A9B1E0D8270DA00599386 /* GTMNSWorkspace+ScreenSaverTest.m */, - 8B2A9B1F0D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.h */, F435E4840DC8F3DC0069CDE8 /* TestData */, ); path = AppKit; @@ -704,6 +709,15 @@ F4BC1C860DDDD45D00108B7D /* GTMHTTPServer.h */, F4BC1C870DDDD45D00108B7D /* GTMHTTPServer.m */, F4BC1E8C0DE1FC4A00108B7D /* GTMHTTPServerTest.m */, + F98680AF0E2C15C300CEE8BF /* GTMLogger.h */, + F98680B00E2C15C300CEE8BF /* GTMLogger.m */, + F98680B10E2C15C300CEE8BF /* GTMLoggerTest.m */, + F98681670E2C1E3A00CEE8BF /* GTMLogger+ASL.h */, + F98681680E2C1E3A00CEE8BF /* GTMLogger+ASL.m */, + F98681950E2C20C100CEE8BF /* GTMLogger+ASLTest.m */, + F95803F60E2FB0760049A088 /* GTMLoggerRingBufferWriter.h */, + F95803F70E2FB0760049A088 /* GTMLoggerRingBufferWriter.m */, + F95803F80E2FB0760049A088 /* GTMLoggerRingBufferWriterTest.m */, 33C374360DD8D44800E97817 /* GTMNSDictionary+URLArguments.h */, 33C374370DD8D44800E97817 /* GTMNSDictionary+URLArguments.m */, 33C3745E0DD8D85B00E97817 /* GTMNSDictionary+URLArgumentsTest.m */, @@ -766,6 +780,7 @@ F48FE2770D198CEA009257D2 /* UnitTesting */ = { isa = PBXGroup; children = ( + 8B7DCBE10DFF18720017E983 /* GTMDevLogUnitTestingBridge.m */, 8B7DCBEC0DFF1A4F0017E983 /* GTMUnitTestDevLog.m */, 8B7DCBF00DFF1A610017E983 /* GTMUnitTestDevLog.h */, F4BC22CF0DE4C39000108B7D /* GTMTestHTTPServer.h */, @@ -821,7 +836,6 @@ F4FF22760D9D47FB003880AC /* DebugUtils */ = { isa = PBXGroup; children = ( - 8B7DCBE10DFF18720017E983 /* GTMDevLog.m */, F4FF22770D9D4835003880AC /* GTMDebugSelectorValidation.h */, 8B6F31EF0DA347720052CA40 /* GTMMethodCheck.m */, 8B6F31F40DA3489B0052CA40 /* GTMMethodCheck.h */, @@ -856,7 +870,6 @@ F437F55D0D50BC0A00F5C3A4 /* GTMRegex.h in Headers */, F47A79880D746EE9002302AB /* GTMScriptRunner.h in Headers */, F413908F0D75F63C00F72B31 /* GTMNSFileManager+Path.h in Headers */, - 8B2A9B220D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.h in Headers */, F424F75F0D9AF019000B87EF /* GTMDefines.h in Headers */, F4FF22780D9D4835003880AC /* GTMDebugSelectorValidation.h in Headers */, F4CA854F0DAFAAF600B4AB10 /* GTMObjC2Runtime.h in Headers */, @@ -878,6 +891,9 @@ F42597480E23AA57003BEA3E /* GTMNSString+Replace.h in Headers */, F42597790E23FE3A003BEA3E /* GTMNSString+FindFolder.h in Headers */, 8B1801A30E2533D500280961 /* GTMLargeTypeWindow.h in Headers */, + F92B9FA80E2E64B900A2FE61 /* GTMLogger.h in Headers */, + F92B9FA90E2E64BC00A2FE61 /* GTMLogger+ASL.h in Headers */, + F95803FA0E2FB08F0049A088 /* GTMLoggerRingBufferWriter.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1164,7 +1180,7 @@ 8B45A2AC0DA49C47001148C5 /* main.m in Sources */, 8B45A2D00DA51A01001148C5 /* GTMUnitTestingUtilities.m in Sources */, 8B7DCBC40DFF0F800017E983 /* GTMMethodCheck.m in Sources */, - 8B7DCEF10E002C210017E983 /* GTMDevLog.m in Sources */, + 8B7DCEF10E002C210017E983 /* GTMDevLogUnitTestingBridge.m in Sources */, 8B2C21B70E00885600B5ECB1 /* GTMObjC2Runtime.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1205,6 +1221,9 @@ F9FD94640E1D312E0005867E /* GTMPathTest.m in Sources */, F425974B0E23AA94003BEA3E /* GTMNSString+ReplaceTest.m in Sources */, F425977F0E23FE43003BEA3E /* GTMNSString+FindFolderTest.m in Sources */, + F98680C40E2C164300CEE8BF /* GTMLoggerTest.m in Sources */, + F98681960E2C20C100CEE8BF /* GTMLogger+ASLTest.m in Sources */, + F95803FB0E2FB0A80049A088 /* GTMLoggerRingBufferWriterTest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1228,7 +1247,6 @@ F437F55E0D50BC0A00F5C3A4 /* GTMRegex.m in Sources */, F47A79890D746EE9002302AB /* GTMScriptRunner.m in Sources */, F41390900D75F63C00F72B31 /* GTMNSFileManager+Path.m in Sources */, - 8B2A9B200D8270DA00599386 /* GTMNSWorkspace+ScreenSaver.m in Sources */, 8B45A21E0DA46E34001148C5 /* GTMObjC2Runtime.m in Sources */, F41D258C0DBD21A300774EEB /* GTMBase64.m in Sources */, F435E08A0DC63F6D0069CDE8 /* GTMHTTPFetcher.m in Sources */, @@ -1242,13 +1260,16 @@ 8B7DCBD20DFF16070017E983 /* GTMNSAppleScript+Handler.m in Sources */, 8B7DCBD30DFF16070017E983 /* GTMNSAppleEventDescriptor+Handler.m in Sources */, 8B7DCBD40DFF16070017E983 /* GTMNSAppleEventDescriptor+Foundation.m in Sources */, - 8B7DCBE20DFF18720017E983 /* GTMDevLog.m in Sources */, + 8B7DCBE20DFF18720017E983 /* GTMDevLogUnitTestingBridge.m in Sources */, F41A6F830E02EC3600788A6C /* GTMSignalHandler.m in Sources */, 8B3AA9F20E033E23007E31B5 /* GTMValidatingContainers.m in Sources */, F9FD94630E1D31280005867E /* GTMPath.m in Sources */, F42597490E23AA57003BEA3E /* GTMNSString+Replace.m in Sources */, F425977A0E23FE3A003BEA3E /* GTMNSString+FindFolder.m in Sources */, 8B1801A20E2533D500280961 /* GTMLargeTypeWindow.m in Sources */, + F98680C30E2C163D00CEE8BF /* GTMLogger.m in Sources */, + F98681970E2C20C800CEE8BF /* GTMLogger+ASL.m in Sources */, + F95803F90E2FB0850049A088 /* GTMLoggerRingBufferWriter.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1262,7 +1283,6 @@ F428FF090D48E57300382ED1 /* GTMNSBezierPath+CGPathTest.m in Sources */, F47F1C1B0D490BD200925B8F /* GTMNSBezierPath+ShadingTest.m in Sources */, F43E447F0D4918BC0041161F /* GTMLinearRGBShadingTest.m in Sources */, - 8B2A9B240D8270DA00599386 /* GTMNSWorkspace+ScreenSaverTest.m in Sources */, 8B5547B90DB3BB220014CC1C /* GTMAppKit+UnitTesting.m in Sources */, 8B7DCBC10DFF0F7F0017E983 /* GTMMethodCheck.m in Sources */, 8B7DCBED0DFF1A4F0017E983 /* GTMUnitTestDevLog.m in Sources */, diff --git a/GTMDefines.h b/GTMDefines.h index 25b554d..0cf7e95 100644 --- a/GTMDefines.h +++ b/GTMDefines.h @@ -76,7 +76,7 @@ // Declared here so that it can easily be used for logging tracking if // necessary. See GTMUnitTestDevLog.h for details. @class NSString; -extern void _GTMUnittestDevLog(NSString *format, ...); +extern void _GTMUnitTestDevLog(NSString *format, ...); #ifndef _GTMDevAssert // we directly invoke the NSAssert handler so we can pass on the varargs diff --git a/GTM_Prefix.pch b/GTM_Prefix.pch index 6740ffb..a7c0011 100644 --- a/GTM_Prefix.pch +++ b/GTM_Prefix.pch @@ -30,7 +30,8 @@ #endif // This turns on unit test logging so that we can track unittests if we are // doing them. See GTMUnitTestDevLog.h for details. - #define _GTMDevLog _GTMUnittestDevLog + // (_GTMUnitTestDevLog comes from GTMDevLogUnitTestingBridge.m) + #define _GTMDevLog _GTMUnitTestDevLog #endif diff --git a/GTMiPhone.xcodeproj/project.pbxproj b/GTMiPhone.xcodeproj/project.pbxproj index 060b9ac..5cc5cf0 100644 --- a/GTMiPhone.xcodeproj/project.pbxproj +++ b/GTMiPhone.xcodeproj/project.pbxproj @@ -39,7 +39,7 @@ 8B41EC100E0711D40040CF9F /* GTMValidatingContainers.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B41EC0D0E0711D40040CF9F /* GTMValidatingContainers.m */; }; 8B5547CA0DB3BBF20014CC1C /* GTMUIKit+UnitTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B5547C70DB3BBF20014CC1C /* GTMUIKit+UnitTesting.m */; }; 8B5547CB0DB3BBF20014CC1C /* GTMUIKit+UnitTestingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B5547C90DB3BBF20014CC1C /* GTMUIKit+UnitTestingTest.m */; }; - 8B7DCEAA0DFF4C760017E983 /* GTMDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCEA90DFF4C760017E983 /* GTMDevLog.m */; }; + 8B7DCEAA0DFF4C760017E983 /* GTMDevLogUnitTestingBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCEA90DFF4C760017E983 /* GTMDevLogUnitTestingBridge.m */; }; 8B7DCEAD0DFF4CA60017E983 /* GTMUnitTestDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCEAC0DFF4CA60017E983 /* GTMUnitTestDevLog.m */; }; 8BC0480F0DAE928A00C2D1CA /* GTMCalculatedRange.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BC047780DAE928A00C2D1CA /* GTMCalculatedRange.m */; }; 8BC048100DAE928A00C2D1CA /* GTMCalculatedRangeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BC047790DAE928A00C2D1CA /* GTMCalculatedRangeTest.m */; }; @@ -112,7 +112,7 @@ 8B5547C70DB3BBF20014CC1C /* GTMUIKit+UnitTesting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMUIKit+UnitTesting.m"; sourceTree = "<group>"; }; 8B5547C80DB3BBF20014CC1C /* GTMUIKit+UnitTesting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMUIKit+UnitTesting.h"; sourceTree = "<group>"; }; 8B5547C90DB3BBF20014CC1C /* GTMUIKit+UnitTestingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMUIKit+UnitTestingTest.m"; sourceTree = "<group>"; }; - 8B7DCEA90DFF4C760017E983 /* GTMDevLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMDevLog.m; sourceTree = "<group>"; }; + 8B7DCEA90DFF4C760017E983 /* GTMDevLogUnitTestingBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMDevLogUnitTestingBridge.m; sourceTree = "<group>"; }; 8B7DCEAB0DFF4CA60017E983 /* GTMUnitTestDevLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMUnitTestDevLog.h; sourceTree = "<group>"; }; 8B7DCEAC0DFF4CA60017E983 /* GTMUnitTestDevLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMUnitTestDevLog.m; sourceTree = "<group>"; }; 8BC047750DAE926E00C2D1CA /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMDefines.h; sourceTree = "<group>"; }; @@ -290,7 +290,6 @@ isa = PBXGroup; children = ( 8BC0479B0DAE928A00C2D1CA /* GTMDebugSelectorValidation.h */, - 8B7DCEA90DFF4C760017E983 /* GTMDevLog.m */, 8BC0479C0DAE928A00C2D1CA /* GTMMethodCheck.h */, 8BC0479D0DAE928A00C2D1CA /* GTMMethodCheck.m */, 8BC0479E0DAE928A00C2D1CA /* GTMMethodCheckTest.m */, @@ -301,6 +300,7 @@ 8BC0479F0DAE928A00C2D1CA /* UnitTesting */ = { isa = PBXGroup; children = ( + 8B7DCEA90DFF4C760017E983 /* GTMDevLogUnitTestingBridge.m */, 8B3AA9270E033647007E31B5 /* GTMTestHTTPServer.h */, 8B3AA9280E033647007E31B5 /* GTMTestHTTPServer.m */, 8BC047A00DAE928A00C2D1CA /* GTMCALayer+UnitTesting.h */, @@ -460,7 +460,7 @@ F439ADEC0DBD3C0000BE9B91 /* GTMBase64Test.m in Sources */, F439ADF00DBD3C4000BE9B91 /* GTMGeometryUtils.m in Sources */, F439ADF10DBD3C4000BE9B91 /* GTMGeometryUtilsTest.m in Sources */, - 8B7DCEAA0DFF4C760017E983 /* GTMDevLog.m in Sources */, + 8B7DCEAA0DFF4C760017E983 /* GTMDevLogUnitTestingBridge.m in Sources */, 8B7DCEAD0DFF4CA60017E983 /* GTMUnitTestDevLog.m in Sources */, 67A7820C0E00927400EBF506 /* GTMIPhoneUnitTestDelegate.m in Sources */, 8B3AA8F30E032FC7007E31B5 /* GTMNSString+URLArguments.m in Sources */, diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 5bd20be..3b5193b 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -35,6 +35,24 @@ Changes since 1.5.1 - Added GTMLargeTypeWindow for doing display windows similar to Address Book Large Type display for phone numbers. +- Removed GTMNSWorkspace+ScreenSaver as it has always been a little dodgy due + to it's dependencies on undocumented frameworks, and the ScreenSaver + framework doesn't play nicely in GC mode. + +- Added property methods to GTMHTTPFetcher. These are convenient alternatives + to storing an NSDictionary in the userData. + +- Renamed GTMDevLog.m to GTMDevLogUnitTestingBridge.m and added some more + comments where it comes into play to hopefully make it more clear that it + isn't needed in most cases. + +- Fixed a potential GTMHTTPFetcher crash on failed authentication. + +- Added a obj-c logging package, GTMLogger, for applications that want an + application level logging system. See GTMLogger.h, GTMLogger+ASL.h, and + GTMLoggerRingBufferWriter.h for what the basic system and two optional + additions can do. + Release 1.5.1 Changes since 1.5.0 diff --git a/DebugUtils/GTMDevLog.m b/UnitTesting/GTMDevLogUnitTestingBridge.m index af30713..c04481c 100644 --- a/DebugUtils/GTMDevLog.m +++ b/UnitTesting/GTMDevLogUnitTestingBridge.m @@ -1,5 +1,5 @@ // -// GTMDevLog.m +// GTMDevLogUnitTestingBridge.m // // Copyright 2008 Google Inc. // @@ -18,10 +18,20 @@ #include "GTMUnitTestDevLog.h" -// This is the logging function that is called by default when building -// GTMFramework. If it can find GTMUnitTestDevLog class it will use it, -// otherwise it falls onto NSLog. -void _GTMUnittestDevLog(NSString *format, ...) { +// +// NOTE: Odds are this file should not be included in your project. It is +// only needed for some enhanced unit testing. +// +// By adding: +// #define _GTMDevLog _GTMUnitTestDevLog +// to your prefix header (like the GTM Framework does), this function then +// works to forward logging messages to the GTMUnitTestDevLog class to +// allow logging validation during unittest, otherwise the messages go to +// NSLog like normal. +// +// See GTMUnitTestDevLog.h for more information on checking logs in unittests. +// +void _GTMUnitTestDevLog(NSString *format, ...) { Class devLogClass = NSClassFromString(@"GTMUnitTestDevLog"); va_list argList; va_start(argList, format); diff --git a/UnitTesting/GTMSenTestCase.h b/UnitTesting/GTMSenTestCase.h index 5f7856c..67f7dad 100644 --- a/UnitTesting/GTMSenTestCase.h +++ b/UnitTesting/GTMSenTestCase.h @@ -179,7 +179,7 @@ do { \ }\ } while(0) -// Generates a failure when a1 is unequal to a2. This test is for C scalars, +// Generates a failure when a1 is equal to a2. This test is for C scalars, // structs and unions. // Args: // a1: argument 1 |