diff options
author | dmaclach <dmaclach@gmail.com> | 2018-11-13 20:48:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 20:48:36 -0800 |
commit | 07dc0ac0b68b69b9e23e07126b02be9b35937154 (patch) | |
tree | d76f9d1af480b1310e39834d3518876c4173838b | |
parent | acc00b258aeef17cff7c8326c28945dd1aec071c (diff) |
Remove unused GTMUnitTestDevLog. (#203)
It wasn't being used anywhere.
-rw-r--r-- | GTM.xcodeproj/project.pbxproj | 6 | ||||
-rw-r--r-- | GTMiPhone.xcodeproj/project.pbxproj | 6 | ||||
-rw-r--r-- | UnitTesting/GTMSenTestCase.h | 4 | ||||
-rw-r--r-- | UnitTesting/GTMUnitTestDevLog.h | 31 | ||||
-rw-r--r-- | UnitTesting/GTMUnitTestDevLog.m | 108 |
5 files changed, 1 insertions, 154 deletions
diff --git a/GTM.xcodeproj/project.pbxproj b/GTM.xcodeproj/project.pbxproj index 359508a..99cff58 100644 --- a/GTM.xcodeproj/project.pbxproj +++ b/GTM.xcodeproj/project.pbxproj @@ -35,7 +35,6 @@ 8B29078711F8D1BF0064F50F /* GTMNSFileHandle+UniqueName.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B29078511F8D1BF0064F50F /* GTMNSFileHandle+UniqueName.m */; }; 8B29080911F8E1630064F50F /* GTMNSFileHandle+UniqueName.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B29078511F8D1BF0064F50F /* GTMNSFileHandle+UniqueName.m */; }; 8B29080A11F8E1670064F50F /* GTMNSFileHandle+UniqueName.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B29078411F8D1BF0064F50F /* GTMNSFileHandle+UniqueName.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8B2C72E81D9EBB6E0027BD14 /* GTMUnitTestDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2C72E71D9EBB6E0027BD14 /* GTMUnitTestDevLog.m */; }; 8B3590160E8190FA0041E21C /* GTMTestTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B3590150E8190FA0041E21C /* GTMTestTimer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8B35901B0E8191750041E21C /* GTMTestTimerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B35901A0E8191750041E21C /* GTMTestTimerTest.m */; }; 8B3E292E0EEB53F8000681D8 /* GTMCarbonEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B3E292A0EEB53F3000681D8 /* GTMCarbonEvent.m */; }; @@ -250,8 +249,6 @@ 8B29078411F8D1BF0064F50F /* GTMNSFileHandle+UniqueName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSFileHandle+UniqueName.h"; sourceTree = "<group>"; }; 8B29078511F8D1BF0064F50F /* GTMNSFileHandle+UniqueName.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSFileHandle+UniqueName.m"; sourceTree = "<group>"; }; 8B29078611F8D1BF0064F50F /* GTMNSFileHandle+UniqueNameTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSFileHandle+UniqueNameTest.m"; sourceTree = "<group>"; }; - 8B2C72E61D9EBB6E0027BD14 /* GTMUnitTestDevLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMUnitTestDevLog.h; sourceTree = "<group>"; }; - 8B2C72E71D9EBB6E0027BD14 /* GTMUnitTestDevLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMUnitTestDevLog.m; sourceTree = "<group>"; }; 8B3590150E8190FA0041E21C /* GTMTestTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMTestTimer.h; sourceTree = "<group>"; }; 8B35901A0E8191750041E21C /* GTMTestTimerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMTestTimerTest.m; sourceTree = "<group>"; }; 8B3E29290EEB53F3000681D8 /* GTMCarbonEventTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMCarbonEventTest.m; sourceTree = "<group>"; }; @@ -739,8 +736,6 @@ F47466651296F19E0022C1FB /* GTMSenTestCaseTest.m */, 8B3590150E8190FA0041E21C /* GTMTestTimer.h */, 8B35901A0E8191750041E21C /* GTMTestTimerTest.m */, - 8B2C72E61D9EBB6E0027BD14 /* GTMUnitTestDevLog.h */, - 8B2C72E71D9EBB6E0027BD14 /* GTMUnitTestDevLog.m */, 8BA983C21D9AE7E6009724B5 /* TestData */, 8B45A2A20DA49C47001148C5 /* GTMUIUnitTestingHarness */, ); @@ -1073,7 +1068,6 @@ buildActionMask = 2147483647; files = ( 8B45A21A0DA46E1D001148C5 /* GTMGeometryUtils.m in Sources */, - 8B2C72E81D9EBB6E0027BD14 /* GTMUnitTestDevLog.m in Sources */, 8B7DCBC30DFF0F7F0017E983 /* GTMMethodCheck.m in Sources */, 8B7DCE1B0DFF39850017E983 /* GTMSenTestCase.m in Sources */, 8B35901B0E8191750041E21C /* GTMTestTimerTest.m in Sources */, diff --git a/GTMiPhone.xcodeproj/project.pbxproj b/GTMiPhone.xcodeproj/project.pbxproj index 6a15d4b..b417ab4 100644 --- a/GTMiPhone.xcodeproj/project.pbxproj +++ b/GTMiPhone.xcodeproj/project.pbxproj @@ -13,7 +13,6 @@ 64D0F5E60FD3E68400506CC7 /* GTMUIImage+Resize_100x50.png in Resources */ = {isa = PBXBuildFile; fileRef = 64D0F5D40FD3E68400506CC7 /* GTMUIImage+Resize_100x50.png */; }; 64D0F5ED0FD3E68400506CC7 /* GTMUIImage+Resize_100x100.png in Resources */ = {isa = PBXBuildFile; fileRef = 64D0F5DB0FD3E68400506CC7 /* GTMUIImage+Resize_100x100.png */; }; 67A7820C0E00927400EBF506 /* GTMIPhoneUnitTestDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 67A7820B0E00927400EBF506 /* GTMIPhoneUnitTestDelegate.m */; }; - 8B2C72E51D9EBB540027BD14 /* GTMUnitTestDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2C72E41D9EBB540027BD14 /* GTMUnitTestDevLog.m */; }; 8B2C72EB1D9EBBA10027BD14 /* GTMTestTimerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2C72EA1D9EBBA10027BD14 /* GTMTestTimerTest.m */; }; 8B7651D81D9C872F00DB2C59 /* GTMLogger+ASL.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7651D61D9C872C00DB2C59 /* GTMLogger+ASL.m */; }; 8B7651D91D9C873200DB2C59 /* GTMLogger+ASLTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7651D71D9C872C00DB2C59 /* GTMLogger+ASLTest.m */; }; @@ -125,8 +124,6 @@ 8B2908AF11F8E7070064F50F /* GTMNSFileHandle+UniqueName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSFileHandle+UniqueName.h"; sourceTree = "<group>"; }; 8B2908B011F8E7070064F50F /* GTMNSFileHandle+UniqueName.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSFileHandle+UniqueName.m"; sourceTree = "<group>"; }; 8B2908B111F8E7070064F50F /* GTMNSFileHandle+UniqueNameTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSFileHandle+UniqueNameTest.m"; sourceTree = "<group>"; }; - 8B2C72E31D9EBB540027BD14 /* GTMUnitTestDevLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMUnitTestDevLog.h; sourceTree = "<group>"; }; - 8B2C72E41D9EBB540027BD14 /* GTMUnitTestDevLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMUnitTestDevLog.m; sourceTree = "<group>"; }; 8B2C72E91D9EBBA10027BD14 /* GTMTestTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMTestTimer.h; sourceTree = "<group>"; }; 8B2C72EA1D9EBBA10027BD14 /* GTMTestTimerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMTestTimerTest.m; sourceTree = "<group>"; }; 8B30806F1056BDCE006C4C7A /* GTMNSNumber+64Bit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSNumber+64Bit.h"; sourceTree = "<group>"; }; @@ -435,8 +432,6 @@ 8BC047F60DAE928A00C2D1CA /* GTMSenTestCase.h */, 8BC047F70DAE928A00C2D1CA /* GTMSenTestCase.m */, F4746720129703600022C1FB /* GTMSenTestCaseTest.m */, - 8B2C72E31D9EBB540027BD14 /* GTMUnitTestDevLog.h */, - 8B2C72E41D9EBB540027BD14 /* GTMUnitTestDevLog.m */, 8B2C72E91D9EBBA10027BD14 /* GTMTestTimer.h */, 8B2C72EA1D9EBBA10027BD14 /* GTMTestTimerTest.m */, F435E49F0DC8F5290069CDE8 /* TestData */, @@ -676,7 +671,6 @@ 8B82CF4E1D9C2385007182AA /* GTMUIImage+ResizeTest.m in Sources */, 8B82CF371D9C2373007182AA /* GTMLightweightProxyTest.m in Sources */, 8B82CF4C1D9C2385007182AA /* GTMFadeTruncatingLabelTest.m in Sources */, - 8B2C72E51D9EBB540027BD14 /* GTMUnitTestDevLog.m in Sources */, 8B82CF3B1D9C2373007182AA /* GTMNSData+zlibTest.m in Sources */, 8B82CF3E1D9C2373007182AA /* GTMNSFileHandle+UniqueNameTest.m in Sources */, 8B82CF501D9C2385007182AA /* GTMSenTestCaseTest.m in Sources */, diff --git a/UnitTesting/GTMSenTestCase.h b/UnitTesting/GTMSenTestCase.h index 475e2f4..dad549c 100644 --- a/UnitTesting/GTMSenTestCase.h +++ b/UnitTesting/GTMSenTestCase.h @@ -1282,9 +1282,7 @@ GTM_EXTERN NSString *const SenTestLineNumberKey; #endif // GTM_IPHONE_SDK && !GTM_USING_XCTEST -// All unittest cases in GTM should inherit from GTMTestCase. It makes sure -// to set up our logging system correctly to verify logging calls. -// See GTMUnitTestDevLog.h for details +// All unittest cases in GTM should inherit from GTMTestCase. #if GTM_USING_XCTEST @interface GTMTestCase : XCTestCase #else diff --git a/UnitTesting/GTMUnitTestDevLog.h b/UnitTesting/GTMUnitTestDevLog.h deleted file mode 100644 index 35d5e0d..0000000 --- a/UnitTesting/GTMUnitTestDevLog.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// GTMUnitTestDevLog.h -// -// Copyright 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 <Foundation/Foundation.h> -#import "GTMDefines.h" - -// GTMUnitTestDevLog modifies assertion logs so they don't get trapped by -// build systems. - -@interface GTMUnitTestDevLog : NSObject - -// Turn tracking on/off -+ (void)enableTracking; -+ (void)disableTracking; - -@end diff --git a/UnitTesting/GTMUnitTestDevLog.m b/UnitTesting/GTMUnitTestDevLog.m deleted file mode 100644 index ae4050f..0000000 --- a/UnitTesting/GTMUnitTestDevLog.m +++ /dev/null @@ -1,108 +0,0 @@ -// -// GTMUnitTestDevLog.m -// -// Copyright 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 "GTMUnitTestDevLog.h" - -@interface GTMUnttestDevLogAssertionHandler : NSAssertionHandler -- (void)handleFailure:(NSString *)functionName - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format - arguments:(va_list)argList NS_FORMAT_FUNCTION(4,0); -@end - -@implementation GTMUnttestDevLogAssertionHandler -- (void)handleFailureInMethod:(SEL)selector - object:(id)object - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format, ... { - NSString *call = [NSString stringWithFormat:@"[%@ %@]", - NSStringFromClass([object class]), - NSStringFromSelector(selector)]; - - va_list argList; - va_start(argList, format); - [self handleFailure:call - file:fileName - lineNumber:line - description:format - arguments:argList]; - va_end(argList); -} - -- (void)handleFailureInFunction:(NSString *)functionName - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format, ... { - va_list argList; - va_start(argList, format); - [self handleFailure:functionName - file:fileName - lineNumber:line - description:format - arguments:argList]; - va_end(argList); -} - -- (void)handleFailure:(NSString *)failure - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format - arguments:(va_list)argList { - NSString *descStr - = [[[NSString alloc] initWithFormat:format arguments:argList] autorelease]; - - // You need a format that will be useful in logs, but won't trip up Xcode or - // any other build systems parsing of the output. - NSString *outLog - = [NSString stringWithFormat:@"RecordedNSAssert in %@ - %@ (%@:%ld)", - failure, descStr, fileName, (long)line]; - // To avoid unused variable warning when _GTMDevLog is stripped. - (void)outLog; - _GTMDevLog(@"%@", outLog); // Don't want any percents in outLog honored - [NSException raise:NSInternalInconsistencyException - format:@"NSAssert raised"]; -} -@end - -@implementation GTMUnitTestDevLog - -+ (void)enableTracking { - - NSMutableDictionary *threadDictionary - = [[NSThread currentThread] threadDictionary]; - if ([threadDictionary objectForKey:@"NSAssertionHandler"] != nil) { - NSLog(@"Warning: replacing NSAssertionHandler to capture assertions"); - } - - // Install an assertion handler to capture those. - GTMUnttestDevLogAssertionHandler *handler = - [[[GTMUnttestDevLogAssertionHandler alloc] init] autorelease]; - [threadDictionary setObject:handler forKey:@"NSAssertionHandler"]; -} - -+ (void)disableTracking { - - // Clear our assertion handler back out. - NSMutableDictionary *threadDictionary - = [[NSThread currentThread] threadDictionary]; - [threadDictionary removeObjectForKey:@"NSAssertionHandler"]; -} - -@end |