aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-03-27 17:15:24 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-03-27 17:15:24 +0000
commite3c268753ab7a8cf62bdf66d64d86707a850a933 (patch)
tree24c0380f59a0ec0d5f9999e53ea634c0b1b974c1
parent6545da262e160fc959e1fe869c517daeff1e184e (diff)
[Author: dmaclach]
Change build script so that it removes all of the gcda files for the current config project wide, which in general is what people will want. Added unit testing to GTMHotKeyTextField. From about 6% up to 90%. DELTA=10 (3 added, 0 deleted, 7 changed) R=thomasvl
-rw-r--r--AppKit/GTMHotKeyTextField.m213
-rw-r--r--AppKit/GTMHotKeyTextFieldTest.h31
-rw-r--r--AppKit/GTMHotKeyTextFieldTest.m255
-rw-r--r--AppKit/GTMHotKeyTextFieldTest.xib383
-rw-r--r--GTM.xcodeproj/project.pbxproj140
-rw-r--r--ReleaseNotes.txt6
-rw-r--r--UnitTesting/GTMSenTestCase.m22
-rw-r--r--UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.nib/keyedobjects.nibbin16183 -> 0 bytes
-rw-r--r--UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.xib (renamed from UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.nib/designable.nib)85
-rwxr-xr-xUnitTesting/RunMacOSUnitTests.sh24
-rw-r--r--UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState2
11 files changed, 869 insertions, 292 deletions
diff --git a/AppKit/GTMHotKeyTextField.m b/AppKit/GTMHotKeyTextField.m
index 6573743..fb479fd 100644
--- a/AppKit/GTMHotKeyTextField.m
+++ b/AppKit/GTMHotKeyTextField.m
@@ -61,7 +61,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
#endif
- (void)dealloc {
-
if (boundObject_ && boundKeyPath_) {
[boundObject_ gtm_removeObserver:self
forKeyPath:boundKeyPath_
@@ -71,7 +70,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
[boundKeyPath_ release];
[hotKeyDict_ release];
[super dealloc];
-
}
#pragma mark Bindings
@@ -80,7 +78,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
- (void)bind:(NSString *)binding toObject:(id)observableController
withKeyPath:(NSString *)keyPath
options:(NSDictionary *)options {
-
if ([binding isEqualToString:NSValueBinding]) {
// Update to our new binding
[self setupBinding:observableController withPath:keyPath];
@@ -90,11 +87,9 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
toObject:observableController
withKeyPath:keyPath
options:options];
-
}
- (void)unbind:(NSString *)binding {
-
// Clean up value on unbind
if ([binding isEqualToString:NSValueBinding]) {
if (boundObject_ && boundKeyPath_) {
@@ -108,7 +103,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
boundKeyPath_ = nil;
}
[super unbind:binding];
-
}
- (void)hotKeyValueChanged:(GTMKeyValueChangeNotification *)note {
@@ -131,7 +125,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
// Private convenience method for attaching to a new binding
- (void)setupBinding:(id)bound withPath:(NSString *)path {
-
// Release previous
if (boundObject_ && boundKeyPath_) {
[boundObject_ gtm_removeObserver:self
@@ -154,174 +147,117 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
hotKeyDict_ = [[boundObject_ valueForKeyPath:boundKeyPath_] copy];
// Update the display string
[self updateDisplayedPrettyString];
-
}
#pragma mark Defeating NSControl
-- (double)doubleValue {
-
+- (int)logBadValueAccess {
// Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return 0.0;
-
+ _GTMDevLog(@"Hot key fields don't take numbers.");
+ return 0;
}
-- (void)setDoubleValue:(double)value {
-
+- (void)logBadStringValueAccess {
// Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return;
-
+ _GTMDevLog(@"Hot key fields want dictionaries, not strings.");
+}
+
+
+- (double)doubleValue {
+ return [self logBadValueAccess];
+}
+
+- (void)setDoubleValue:(double)value {
+ [self logBadValueAccess];
}
- (float)floatValue {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return 0.0f;
-
+ return [self logBadValueAccess];
}
- (void)setFloatValue:(float)value {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return;
-
+ [self logBadValueAccess];
}
- (int)intValue {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return 0;
-
+ return [self logBadValueAccess];
}
- (void)setIntValue:(int)value {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return;
-
+ [self logBadValueAccess];
}
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
- (NSInteger)integerValue {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return 0;
-
+ return [self logBadValueAccess];
}
- (void)setIntegerValue:(NSInteger)value {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return;
-
+ [self logBadValueAccess];
}
#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
- (id)objectValue {
-
return [self hotKeyValue];
-
}
- (void)setObjectValue:(id)object {
-
[self setHotKeyValue:object];
-
}
- (NSString *)stringValue {
-
return [[self class] displayStringForHotKey:hotKeyDict_];
-
}
- (void)setStringValue:(NSString *)string {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields want dictionaries, not strings.");
- return;
-
+ [self logBadStringValueAccess];
}
- (NSAttributedString *)attributedStringValue {
-
+ NSAttributedString *attrString = nil;
NSString *prettyString = [self stringValue];
- if (!prettyString) return nil;
- return [[[NSAttributedString alloc] initWithString:prettyString] autorelease];
-
+ if (prettyString) {
+ attrString = [[[NSAttributedString alloc]
+ initWithString:prettyString] autorelease];
+ }
+ return attrString;
}
- (void)setAttributedStringValue:(NSAttributedString *)string {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields want dictionaries, not strings.");
- return;
-
+ [self logBadStringValueAccess];
}
- (void)takeDoubleValueFrom:(id)sender {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return;
-
+ [self logBadValueAccess];
}
- (void)takeFloatValueFrom:(id)sender {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return;
-
+ [self logBadValueAccess];
}
- (void)takeIntValueFrom:(id)sender {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't take numbers.");
- return;
-
+ [self logBadValueAccess];
}
- (void)takeObjectValueFrom:(id)sender {
-
// Defeating NSControl
- _GTMDevAssert(NO,
- @"Hot key fields want dictionaries via bindings, not from controls.");
- return;
-
+ _GTMDevLog(@"Hot key fields want dictionaries via bindings, "
+ @"not from controls.");
}
- (void)takeStringValueFrom:(id)sender {
-
- // Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields want dictionaries, not strings.");
- return;
-
+ [self logBadStringValueAccess];
}
- (id)formatter {
-
return nil;
-
}
- (void)setFormatter:(NSFormatter *)newFormatter {
-
// Defeating NSControl
- _GTMDevAssert(NO, @"Hot key fields don't accept formatters.");
- return;
-
+ _GTMDevLog(@"Hot key fields don't accept formatters.");
}
#pragma mark Hot Key Support
@@ -338,7 +274,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
}
- (void)setHotKeyValue:(NSDictionary *)hotKey {
-
// Sanity only if set, nil is OK
if (hotKey && ![[self class] isValidHotKey:hotKey]) {
return;
@@ -348,26 +283,21 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
if (boundObject_ && boundKeyPath_) {
// If the change is accepted this will call us back as an observer
[boundObject_ setValue:hotKey forKeyPath:boundKeyPath_];
- return;
+ } else {
+ // Otherwise we directly update ourself
+ [hotKeyDict_ autorelease];
+ hotKeyDict_ = [hotKey copy];
+ [self updateDisplayedPrettyString];
}
-
- // Otherwise we directly update ourself
- [hotKeyDict_ autorelease];
- hotKeyDict_ = [hotKey copy];
- [self updateDisplayedPrettyString];
-
}
- (NSDictionary *)hotKeyValue {
-
return hotKeyDict_;
-
}
// Private method to update the displayed text of the field with the
// user-readable representation.
- (void)updateDisplayedPrettyString {
-
// Basic validation
if (![[self class] isValidHotKey:hotKeyDict_]) {
[super setStringValue:@""];
@@ -384,7 +314,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
}
+ (NSString *)displayStringForHotKey:(NSDictionary *)hotKeyDict {
-
if (!hotKeyDict) return nil;
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
@@ -406,14 +335,12 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
resourceBundle:bundle];
if (!keystroke || ![keystroke length]) return nil;
return [NSString stringWithFormat:@"%@%@", mods, keystroke];
-
}
#pragma mark Field Editor Callbacks
- (BOOL)textShouldBeginEditing:(GTMHotKeyFieldEditor *)fieldEditor {
-
// Sanity
if (![fieldEditor isKindOfClass:[GTMHotKeyFieldEditor class]]) {
_GTMDevLog(@"Field editor not appropriate for field, check window delegate");
@@ -431,11 +358,9 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
// Update the field editor internal hotkey representation
[fieldEditor setHotKeyDictionary:hotKeyDict_]; // OK if its nil
return YES;
-
}
- (void)textDidChange:(NSNotification *)notification {
-
// Sanity
GTMHotKeyFieldEditor *fieldEditor = [notification object];
if (![fieldEditor isKindOfClass:[GTMHotKeyFieldEditor class]]) {
@@ -449,11 +374,9 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
// Let super handle the notifications
[super textDidChange:notification];
-
}
- (BOOL)textShouldEndEditing:(GTMHotKeyFieldEditor *)fieldEditor {
-
// Sanity
if (![fieldEditor isKindOfClass:[GTMHotKeyFieldEditor class]]) {
_GTMDevLog(@"Field editor not appropriate for field, check window delegate");
@@ -475,7 +398,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
[self setHotKeyValue:[fieldEditor hotKeyDictionary]];
return YES;
-
}
#pragma mark Class methods building strings for use w/in the UI.
@@ -511,7 +433,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
// conflicts.
+ (NSString *)stringForModifierFlags:(unsigned int)flags {
-
UniChar modChars[4]; // We only look for 4 flags
unsigned int charCount = 0;
// These are in the same order as the menu manager shows them
@@ -521,13 +442,11 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
if (flags & NSCommandKeyMask) modChars[charCount++] = kCommandUnicode;
if (charCount == 0) return nil;
return [NSString stringWithCharacters:modChars length:charCount];
-
}
+ (NSString *)stringForKeycode:(UInt16)keycode
useGlyph:(BOOL)useGlyph
resourceBundle:(NSBundle *)bundle {
-
// Some keys never move in any layout (to the best of our knowledge at least)
// so we can hard map them.
UniChar key = 0;
@@ -774,7 +693,6 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
}
return keystrokeString;
-
}
@end
@@ -784,45 +702,37 @@ static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL;
GTMOBJECT_SINGLETON_BOILERPLATE(GTMHotKeyFieldEditor, sharedHotKeyFieldEditor)
- (id)init {
-
- self = [super init];
- if (!self) return nil;
- [self setFieldEditor:YES]; // We are a field editor
-
+ if ((self = [super init])) {
+ [self setFieldEditor:YES]; // We are a field editor
+ }
return self;
-
}
+// COV_NF_START
+// Singleton so never called.
- (void)dealloc {
-
[hotKeyDict_ release];
[super dealloc];
-
}
+// COV_NF_END
+
- (NSArray *)acceptableDragTypes {
-
// Don't take drags
return [NSArray array];
-
}
- (NSArray *)readablePasteboardTypes {
-
// No pasting
return [NSArray array];
-
}
- (NSArray *)writablePasteboardTypes {
-
// No copying
return [NSArray array];
-
}
- (BOOL)becomeFirstResponder {
-
// We need to lose focus any time the window is not key
NSNotificationCenter *dc = [NSNotificationCenter defaultCenter];
[dc addObserver:self
@@ -830,55 +740,45 @@ GTMOBJECT_SINGLETON_BOILERPLATE(GTMHotKeyFieldEditor, sharedHotKeyFieldEditor)
name:NSWindowDidResignKeyNotification
object:[self window]];
return [super becomeFirstResponder];
-
}
- (BOOL)resignFirstResponder {
-
// No longer interested in window resign
[[NSNotificationCenter defaultCenter] removeObserver:self];
return [super resignFirstResponder];
-
}
// Private method we use to get out of global hotkey capture when the window
// is no longer front
- (void)windowResigned:(NSNotification *)notification {
-
// Lose our focus
- [[self window] makeFirstResponder:[self window]];
+ NSWindow *window = [self window];
+ [window makeFirstResponder:window];
}
- (BOOL)shouldDrawInsertionPoint {
-
// Show an insertion point, because we'll kill our own focus after
// each entry
return YES;
-
}
- (NSRange)selectionRangeForProposedRange:(NSRange)proposedSelRange
granularity:(NSSelectionGranularity)granularity {
-
// Always select everything
return NSMakeRange(0, [[self textStorage] length]);
-
}
- (void)keyDown:(NSEvent *)theEvent {
-
if ([self shouldBypassEvent:theEvent]) {
[super keyDown:theEvent];
} else {
// Try to eat the event
[self processEventToHotKeyAndString:theEvent];
}
-
}
- (BOOL)performKeyEquivalent:(NSEvent *)theEvent {
-
if ([self shouldBypassEvent:theEvent]) {
return [super performKeyEquivalent:theEvent];
} else {
@@ -886,12 +786,10 @@ GTMOBJECT_SINGLETON_BOILERPLATE(GTMHotKeyFieldEditor, sharedHotKeyFieldEditor)
[self processEventToHotKeyAndString:theEvent];
return YES;
}
-
}
// Private do method that tell us to ignore certain events
- (BOOL)shouldBypassEvent:(NSEvent *)theEvent {
-
UInt16 keyCode = [theEvent keyCode];
NSUInteger modifierFlags
= [theEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask;
@@ -920,13 +818,11 @@ GTMOBJECT_SINGLETON_BOILERPLATE(GTMHotKeyFieldEditor, sharedHotKeyFieldEditor)
}
return NO;
-
}
// Private method that turns events into strings and dictionaries for our
// hotkey plumbing.
- (void)processEventToHotKeyAndString:(NSEvent *)theEvent {
-
// Construct a dictionary of the event as a hotkey pref
NSDictionary *newHotKey = [self hotKeyDictionaryForEvent:theEvent];
if (!newHotKey) {
@@ -964,17 +860,13 @@ GTMOBJECT_SINGLETON_BOILERPLATE(GTMHotKeyFieldEditor, sharedHotKeyFieldEditor)
// its better than constantly capturing user events. This is exactly
// like the Apple editor in their Keyboard pref pane.
[[[self delegate] cell] endEditing:self];
-
}
- (NSDictionary *)hotKeyDictionary {
-
return hotKeyDict_;
-
}
- (void)setHotKeyDictionary:(NSDictionary *)hotKey {
-
[hotKeyDict_ autorelease];
hotKeyDict_ = [hotKey copy];
// Update content
@@ -986,11 +878,9 @@ GTMOBJECT_SINGLETON_BOILERPLATE(GTMHotKeyFieldEditor, sharedHotKeyFieldEditor)
prettyString = @"";
}
[self setString:prettyString];
-
}
-- (NSDictionary *)hotKeyDictionaryForEvent:(NSEvent *)event{
-
+- (NSDictionary *)hotKeyDictionaryForEvent:(NSEvent *)event {
if (!event) return nil;
// Check event
@@ -1018,7 +908,6 @@ GTMOBJECT_SINGLETON_BOILERPLATE(GTMHotKeyFieldEditor, sharedHotKeyFieldEditor)
[NSNumber numberWithUnsignedInt:cleanFlags],
kGTMHotKeyModifierFlagsKey,
nil];
-
}
-@end
+@end
diff --git a/AppKit/GTMHotKeyTextFieldTest.h b/AppKit/GTMHotKeyTextFieldTest.h
new file mode 100644
index 0000000..8cf05c2
--- /dev/null
+++ b/AppKit/GTMHotKeyTextFieldTest.h
@@ -0,0 +1,31 @@
+// GTMHotKeyTextFieldTest.h
+//
+// Copyright 2006-2009 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>
+
+@class GTMHotKeyTextField;
+
+@interface GTMHotKeyTextFieldTestController : NSWindowController {
+ @private
+ IBOutlet GTMHotKeyTextField *view_;
+}
+
+- (GTMHotKeyTextField *)view;
+@end
+
+@interface GTMHotKeyTextFieldTestControllerWindowDelegate : NSObject
+@end
diff --git a/AppKit/GTMHotKeyTextFieldTest.m b/AppKit/GTMHotKeyTextFieldTest.m
index ee1bfc2..971737a 100644
--- a/AppKit/GTMHotKeyTextFieldTest.m
+++ b/AppKit/GTMHotKeyTextFieldTest.m
@@ -15,9 +15,11 @@
// the License.
//
+#import "GTMHotKeyTextFieldTest.h"
#import "GTMHotKeyTextField.h"
-
#import "GTMSenTestCase.h"
+#import "GTMUnitTestDevLog.h"
+#import <Carbon/Carbon.h>
@interface GTMHotKeyTextField (PrivateMethods)
// Private methods which we want to access to test
@@ -25,11 +27,34 @@
+ (NSString *)displayStringForHotKey:(NSDictionary *)hotKey;
@end
-@interface GTMHotKeyTextFieldTest : GTMTestCase
+@interface GTMHotKeyTextFieldTest : GTMTestCase {
+ @private
+ GTMHotKeyTextFieldTestController *controller_;
+ NSMutableDictionary *hotkeyValues_;
+}
@end
@implementation GTMHotKeyTextFieldTest
+- (void)setUp {
+ controller_ = [[GTMHotKeyTextFieldTestController alloc] init];
+ hotkeyValues_
+ = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
+ [NSNumber numberWithInt:NSCommandKeyMask], kGTMHotKeyModifierFlagsKey,
+ [NSNumber numberWithInt:42], kGTMHotKeyKeyCodeKey,
+ [NSNumber numberWithBool:NO], kGTMHotKeyDoubledModifierKey,
+ nil];
+ STAssertNotNil(hotkeyValues_, nil);
+ STAssertNotNil(controller_, nil);
+ STAssertNotNil([controller_ window], nil);
+}
+
+- (void)tearDown {
+ [controller_ close];
+ [controller_ release];
+ [hotkeyValues_ release];
+}
+
- (void)testStringForModifierFlags {
// Make sure only the flags we expect generate things in their strings
@@ -201,4 +226,230 @@
STAssertFalse([GTMHotKeyTextField isValidHotKey:hkDict], nil);
}
+- (void)testFieldEditorSettersAndGetters {
+ NSWindow *window = [controller_ window];
+ GTMHotKeyTextField *field = [controller_ view];
+ STAssertNotNil(field, nil);
+ GTMHotKeyFieldEditor *editor
+ = (GTMHotKeyFieldEditor *)[window fieldEditor:YES forObject:field];
+ STAssertTrue([editor isMemberOfClass:[GTMHotKeyFieldEditor class]], nil);
+ STAssertEqualObjects(editor,
+ [GTMHotKeyFieldEditor sharedHotKeyFieldEditor],
+ nil);
+ SEL selectors[] =
+ {
+ @selector(readablePasteboardTypes),
+ @selector(acceptableDragTypes),
+ @selector(writablePasteboardTypes)
+ };
+ for (size_t i = 0; i < sizeof(selectors) / sizeof(selectors[0]); ++i) {
+ NSArray *array = [editor performSelector:selectors[i]];
+ STAssertNotNil(array, nil);
+ STAssertEquals([array count], (NSUInteger)0,
+ @"Failed Selector: %@", NSStringFromSelector(selectors[i]));
+ }
+}
+
+- (void)testTextFieldSettersAndGetters {
+ GTMHotKeyTextField *field = [controller_ view];
+ STAssertNotNil(field, nil);
+ NSString *expectedNumberString = @"Hot key fields don't take numbers.";
+ [GTMUnitTestDevLog expect:6 casesOfString:expectedNumberString];
+ [field setDoubleValue:2];
+ [field setIntValue:-1];
+ [field setFloatValue:0];
+ STAssertEquals([field doubleValue], 0.0, nil);
+ STAssertEquals([field intValue], 0, nil);
+ STAssertEquals([field floatValue], 0.0f, nil);
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+ [GTMUnitTestDevLog expect:2 casesOfString:expectedNumberString];
+ [field setIntegerValue:5];
+ STAssertEquals([field integerValue], (NSInteger)0, nil);
+#endif
+ SEL takeNumberSels[] =
+ {
+ @selector(takeDoubleValueFrom:),
+ @selector(takeFloatValueFrom:),
+ @selector(takeIntValueFrom:)
+ };
+ for (size_t i = 0;
+ i < sizeof(takeNumberSels) / sizeof(takeNumberSels[0]); ++i) {
+ [GTMUnitTestDevLog expect:2 casesOfString:expectedNumberString];
+ [field performSelector:takeNumberSels[i] withObject:self];
+ [field performSelector:takeNumberSels[i] withObject:nil];
+ }
+
+ NSString *expectedStringString
+ = @"Hot key fields want dictionaries, not strings.";
+ [GTMUnitTestDevLog expect:6 casesOfString:expectedStringString];
+ [field takeStringValueFrom:self];
+ [field takeStringValueFrom:nil];
+ [field setStringValue:nil];
+ [field setStringValue:@"foo"];
+
+ NSAttributedString *attrString
+ = [[[NSAttributedString alloc] initWithString:@"foo"] autorelease];
+ [field setAttributedStringValue:nil];
+ [field setAttributedStringValue:attrString];
+
+ STAssertNil([field formatter], nil);
+ [GTMUnitTestDevLog expectString:@"Hot key fields don't accept formatters."];
+ [field setFormatter:nil];
+
+ [GTMUnitTestDevLog expect:2 casesOfString:
+ @"Hot key fields want dictionaries via bindings, not from controls."];
+ [field takeObjectValueFrom:self];
+ [field takeObjectValueFrom:nil];
+}
+
+- (void)pressKey:(NSString *)key code:(NSInteger)code
+ modifierFlags:(NSInteger)flags window:(NSWindow *)window {
+ NSInteger windNum = [window windowNumber];
+ NSGraphicsContext *context = [NSGraphicsContext currentContext];
+ EventTime evtTime = GetCurrentEventTime();
+ NSPoint loc = [NSEvent mouseLocation];
+ NSEvent *keyDownEvt = [NSEvent keyEventWithType:NSKeyDown
+ location:loc
+ modifierFlags:flags
+ timestamp:evtTime
+ windowNumber:windNum
+ context:context
+ characters:key
+ charactersIgnoringModifiers:key
+ isARepeat:NO
+ keyCode:code];
+ NSEvent *keyUpEvt = [NSEvent keyEventWithType:NSKeyUp
+ location:loc
+ modifierFlags:flags
+ timestamp:evtTime
+ windowNumber:windNum
+ context:context
+ characters:key
+ charactersIgnoringModifiers:key
+ isARepeat:NO
+ keyCode:code];
+ STAssertNotNil(keyDownEvt, nil);
+ STAssertNotNil(keyUpEvt, nil);
+ [window sendEvent:keyDownEvt];
+ [window sendEvent:keyUpEvt];
+}
+
+- (void)testTextFieldBindings {
+ NSObjectController *controller
+ = [[[NSObjectController alloc] init] autorelease];
+ [controller bind:NSContentBinding
+ toObject:self
+ withKeyPath:@"self"
+ options:nil];
+ STAssertNotNil(controller, nil);
+ GTMHotKeyTextField *field = [controller_ view];
+ STAssertNotNil(field, nil);
+ [field bind:NSValueBinding
+ toObject:controller
+ withKeyPath:@"selection.hotkeyValues_"
+ options:nil];
+ id value = [field objectValue];
+ STAssertEqualObjects(value, hotkeyValues_, nil);
+ NSString *stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⌘\\", nil);
+ NSAttributedString *attrStringValue = [field attributedStringValue];
+ STAssertEqualObjects([attrStringValue string], stringValue, nil);
+
+ // Try changing some values
+ [self willChangeValueForKey:@"hotkeyValues_"];
+ [hotkeyValues_ setObject:[NSNumber numberWithInt:43]
+ forKey:kGTMHotKeyKeyCodeKey];
+ [self didChangeValueForKey:@"hotkeyValues_"];
+ stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⌘,", nil);
+
+ // Now try some typing
+ NSWindow *window = [controller_ window];
+ [window makeFirstResponder:field];
+ [self pressKey:@"A" code:0 modifierFlags:NSShiftKeyMask window:window];
+ stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⇧A", nil);
+
+ // field is supposed to give up first responder when editing is done.
+ STAssertNotEqualObjects([window firstResponder], field, nil);
+
+ [window makeFirstResponder:field];
+ [self pressKey:@"A" code:0 modifierFlags:NSCommandKeyMask window:window];
+ stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⌘A", nil);
+
+ // Try without a modifier. This should fail.
+ [window makeFirstResponder:field];
+ [self pressKey:@"s" code:1 modifierFlags:0 window:window];
+ stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⌘A", nil);
+
+ // Try cmd-q this should fail
+ [window makeFirstResponder:field];
+ [self pressKey:@"Q" code:12 modifierFlags:NSCommandKeyMask window:window];
+ stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⌘A", nil);
+
+ // Try cmd-w this should fail
+ [window makeFirstResponder:field];
+ [self pressKey:@"W" code:13 modifierFlags:NSCommandKeyMask window:window];
+ stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⌘A", nil);
+
+ // Try cmd-tab this should fail
+ [window makeFirstResponder:field];
+ [self pressKey:@"\t" code:48 modifierFlags:NSCommandKeyMask window:window];
+ stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⌘A", nil);
+
+ // Do it by dictionary
+ NSDictionary *cmdSHotKey
+ = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:NSCommandKeyMask], kGTMHotKeyModifierFlagsKey,
+ [NSNumber numberWithInt:1], kGTMHotKeyKeyCodeKey,
+ [NSNumber numberWithBool:NO], kGTMHotKeyDoubledModifierKey,
+ nil];
+ [field setObjectValue:cmdSHotKey];
+ stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⌘S", nil);
+
+ // Check to make sure the binding stuck
+ STAssertEqualObjects(cmdSHotKey, hotkeyValues_, nil);
+
+ [field unbind:NSValueBinding];
+ [controller unbind:NSContentBinding];
+
+ NSDictionary *cmdDHotKey
+ = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:NSCommandKeyMask], kGTMHotKeyModifierFlagsKey,
+ [NSNumber numberWithInt:2], kGTMHotKeyKeyCodeKey,
+ [NSNumber numberWithBool:NO], kGTMHotKeyDoubledModifierKey,
+ nil];
+ [field setObjectValue:cmdDHotKey];
+ stringValue = [field stringValue];
+ STAssertEqualObjects(stringValue, @"⌘D", nil);
+}
+@end
+
+@implementation GTMHotKeyTextFieldTestController
+- (id)init {
+ return [super initWithWindowNibName:@"GTMHotKeyTextFieldTest"];
+}
+
+- (GTMHotKeyTextField *)view {
+ return view_;
+}
+
@end
+
+@implementation GTMHotKeyTextFieldTestControllerWindowDelegate
+
+-(id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject {
+ id editor = nil;
+ if ([anObject isKindOfClass:[GTMHotKeyTextField class]]) {
+ editor = [GTMHotKeyFieldEditor sharedHotKeyFieldEditor];
+ }
+ return editor;
+}
+@end
+
diff --git a/AppKit/GTMHotKeyTextFieldTest.xib b/AppKit/GTMHotKeyTextFieldTest.xib
new file mode 100644
index 0000000..c95b39d
--- /dev/null
+++ b/AppKit/GTMHotKeyTextFieldTest.xib
@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
+ <data>
+ <int key="IBDocument.SystemTarget">1050</int>
+ <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
+ <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="1"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1001">
+ <string key="NSClassName">GTMHotKeyTextFieldTestController</string>
+ </object>
+ <object class="NSCustomObject" id="1003">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1004">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSWindowTemplate" id="1005">
+ <int key="NSWindowStyleMask">1</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{196, 448}, {136, 62}}</string>
+ <int key="NSWTFlags">536870912</int>
+ <string key="NSWindowTitle">Window</string>
+ <string key="NSWindowClass">NSWindow</string>
+ <nil key="NSViewClass"/>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <object class="NSView" key="NSWindowView" id="1006">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTextField" id="972143176">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{20, 20}, {96, 22}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="781959520">
+ <int key="NSCellFlags">-1804468671</int>
+ <int key="NSCellFlags2">272630784</int>
+ <string key="NSContents"/>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.300000e+01</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="972143176"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textBackgroundColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{136, 62}</string>
+ <reference key="NSSuperview"/>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ </object>
+ <object class="NSCustomObject" id="421484812">
+ <string key="NSClassName">GTMHotKeyTextFieldTestControllerWindowDelegate</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1005"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">view_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="972143176"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">initialFirstResponder</string>
+ <reference key="source" ref="1005"/>
+ <reference key="destination" ref="972143176"/>
+ </object>
+ <int key="connectionID">12</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="1005"/>
+ <reference key="destination" ref="421484812"/>
+ </object>
+ <int key="connectionID">13</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="1002">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1001"/>
+ <reference key="parent" ref="1002"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="1003"/>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1004"/>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="1005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1006"/>
+ </object>
+ <reference key="parent" ref="1002"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="1006"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="972143176"/>
+ </object>
+ <reference key="parent" ref="1005"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4</int>
+ <reference key="object" ref="972143176"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="781959520"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="781959520"/>
+ <reference key="parent" ref="972143176"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="421484812"/>
+ <reference key="parent" ref="1002"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.IBPluginDependency</string>
+ <string>-3.IBPluginDependency</string>
+ <string>1.IBEditorWindowLastContentRect</string>
+ <string>1.IBPluginDependency</string>
+ <string>1.IBWindowTemplateEditedContentRect</string>
+ <string>1.NSWindowTemplate.visibleAtLaunch</string>
+ <string>1.WindowOrigin</string>
+ <string>1.editorWindowContentRectSynchronizationRect</string>
+ <string>10.IBPluginDependency</string>
+ <string>2.IBPluginDependency</string>
+ <string>4.CustomClassName</string>
+ <string>4.IBPluginDependency</string>
+ <string>5.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{746, 673}, {136, 62}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{746, 673}, {136, 62}}</string>
+ <boolean value="NO"/>
+ <string>{196, 240}</string>
+ <string>{{357, 418}, {480, 270}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>GTMHotKeyTextField</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">13</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">GTMHotKeyTextField</string>
+ <string key="superclassName">NSTextField</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">AppKit/GTMHotKeyTextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">GTMHotKeyTextFieldTestController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">view_</string>
+ <string key="NS.object.0">GTMHotKeyTextField</string>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="690883007">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">AppKit/GTMHotKeyTextFieldTest.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">GTMHotKeyTextFieldTestControllerWindowDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="690883007"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="837783357">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMAppKit+UnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSCell</string>
+ <reference key="sourceIdentifier" ref="837783357"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSControl</string>
+ <reference key="sourceIdentifier" ref="837783357"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSMenu</string>
+ <reference key="sourceIdentifier" ref="837783357"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">AppKit/GTMCarbonEvent.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">AppKit/GTMDelegatingTableColumn.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Foundation/GTMHTTPServer.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Foundation/GTMNSAppleEventDescriptor+Foundation.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Foundation/GTMNSObject+KeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMCALayer+UnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMNSObject+BindingUnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMNSObject+UnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSTextField</string>
+ <reference key="sourceIdentifier" ref="837783357"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSView</string>
+ <reference key="sourceIdentifier" ref="837783357"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSWindow</string>
+ <reference key="sourceIdentifier" ref="837783357"/>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../GTM.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
diff --git a/GTM.xcodeproj/project.pbxproj b/GTM.xcodeproj/project.pbxproj
index 242f079..b1420bb 100644
--- a/GTM.xcodeproj/project.pbxproj
+++ b/GTM.xcodeproj/project.pbxproj
@@ -11,11 +11,9 @@
isa = PBXAggregateTarget;
buildConfigurationList = F47204340D33BEDF00E9F378 /* Build configuration list for PBXAggregateTarget "All UnitTests" */;
buildPhases = (
+ 8BAA9A2B0F7AF44A00DF4F12 /* ShellScript */,
);
dependencies = (
- 8B45A0390DA46A20001148C5 /* PBXTargetDependency */,
- F472042F0D33BEB500E9F378 /* PBXTargetDependency */,
- F472042D0D33BEB500E9F378 /* PBXTargetDependency */,
);
name = "All UnitTests";
productName = "All UnitTests";
@@ -56,15 +54,11 @@
6294454C0EDDF89A009295EA /* GTMNSArray+MergeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6294454B0EDDF89A009295EA /* GTMNSArray+MergeTest.m */; };
7F3EB38E0E5E09C700A7A75E /* GTMNSImage+Scaling.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F3EB38C0E5E09C700A7A75E /* GTMNSImage+Scaling.h */; settings = {ATTRIBUTES = (Public, ); }; };
7F3EB38F0E5E09C700A7A75E /* GTMNSImage+Scaling.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F3EB38D0E5E09C700A7A75E /* GTMNSImage+Scaling.m */; };
- 7F3EB3940E5E0A2100A7A75E /* GTMNSImage+ScalingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F3EB3930E5E0A2100A7A75E /* GTMNSImage+ScalingTest.m */; };
7F3EB5540E5F0B0400A7A75E /* GTMUnitTestingImage.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 8BEEA90A0DA7446300894774 /* GTMUnitTestingImage.tiff */; };
- 7F3EB5870E5F0CBB00A7A75E /* GTMLargeTypeWindowTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1801A40E2533DB00280961 /* GTMLargeTypeWindowTest.m */; };
7F511DF90F4B0378009F41B6 /* GTMNSColor+Luminance.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F511DF30F4B0378009F41B6 /* GTMNSColor+Luminance.h */; settings = {ATTRIBUTES = (Public, ); }; };
7F511DFA0F4B0378009F41B6 /* GTMNSColor+Luminance.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F511DF40F4B0378009F41B6 /* GTMNSColor+Luminance.m */; };
7F511DFC0F4B0378009F41B6 /* GTMTheme.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F511DF60F4B0378009F41B6 /* GTMTheme.h */; settings = {ATTRIBUTES = (Public, ); }; };
7F511DFE0F4B0378009F41B6 /* GTMTheme.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F511DF80F4B0378009F41B6 /* GTMTheme.m */; };
- 7F511E010F4B03B4009F41B6 /* GTMNSColor+LuminanceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F511DF50F4B0378009F41B6 /* GTMNSColor+LuminanceTest.m */; };
- 7F511E020F4B03BC009F41B6 /* GTMThemeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F511DF70F4B0378009F41B6 /* GTMThemeTest.m */; };
84B91B8B0EA3CC2E0087500F /* GTMUnitTestingImage.10.6.0.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 84B91B890EA3CC2E0087500F /* GTMUnitTestingImage.10.6.0.tiff */; };
84B91B8C0EA3CC2E0087500F /* GTMUnitTestingWindow.10.6.0.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 84B91B8A0EA3CC2E0087500F /* GTMUnitTestingWindow.10.6.0.tiff */; };
8B1801A20E2533D500280961 /* GTMLargeTypeWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1801A00E2533D500280961 /* GTMLargeTypeWindow.m */; };
@@ -98,7 +92,6 @@
8B45A2040DA46DF6001148C5 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
8B45A21A0DA46E1D001148C5 /* GTMGeometryUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = F48FE27F0D198D0E009257D2 /* GTMGeometryUtils.m */; };
8B45A21E0DA46E34001148C5 /* GTMObjC2Runtime.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6F32040DA34A1B0052CA40 /* GTMObjC2Runtime.m */; };
- 8B45A2AA0DA49C47001148C5 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 8B45A2A50DA49C47001148C5 /* MainMenu.nib */; };
8B45A2AC0DA49C47001148C5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B45A2A80DA49C47001148C5 /* main.m */; };
8B45A2B30DA49CA9001148C5 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
8B45A2D00DA51A01001148C5 /* GTMUnitTestingUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B45A2680DA498A0001148C5 /* GTMUnitTestingUtilities.m */; };
@@ -143,16 +136,27 @@
8B7DCE1B0DFF39850017E983 /* GTMSenTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCE180DFF39850017E983 /* GTMSenTestCase.m */; };
8B7DCEF10E002C210017E983 /* GTMDevLogUnitTestingBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCBE10DFF18720017E983 /* GTMDevLogUnitTestingBridge.m */; };
8B8B10290EEB8B1600E543D0 /* GTMHotKeyTextFieldTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A420EE0EDDF8E000397A11 /* GTMHotKeyTextFieldTest.m */; };
- 8B8B102A0EEB8B2900E543D0 /* GTMCarbonEventTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B3E29290EEB53F3000681D8 /* GTMCarbonEventTest.m */; };
8B8B10F90EEB8B9E00E543D0 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F42E09AD0D19A62F00D5DDE0 /* Carbon.framework */; };
8B8B10FD0EEB8BC300E543D0 /* GTMUnitTestingUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B45A2680DA498A0001148C5 /* GTMUnitTestingUtilities.m */; };
- 8B8B11000EEB8CD000E543D0 /* GTMGetURLHandlerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B8B10FF0EEB8CD000E543D0 /* GTMGetURLHandlerTest.m */; };
8B8EC87D0EF17C270044D13F /* GTMNSFileManager+Carbon.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8EC87B0EF17C270044D13F /* GTMNSFileManager+Carbon.h */; settings = {ATTRIBUTES = (Public, ); }; };
8B8EC87E0EF17C270044D13F /* GTMNSFileManager+Carbon.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B8EC87C0EF17C270044D13F /* GTMNSFileManager+Carbon.m */; };
8B8EC8800EF17C2F0044D13F /* GTMNSFileManager+CarbonTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B8EC87F0EF17C2F0044D13F /* GTMNSFileManager+CarbonTest.m */; };
8BA01B5D0F144BD800926923 /* GTMNSWorkspace+Running.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA01B5B0F144BD800926923 /* GTMNSWorkspace+Running.m */; };
8BA01B5E0F144BD800926923 /* GTMNSWorkspace+Running.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA01B5C0F144BD800926923 /* GTMNSWorkspace+Running.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 8BA01B600F144BE500926923 /* GTMNSWorkspace+RunningTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA01B5F0F144BE500926923 /* GTMNSWorkspace+RunningTest.m */; };
+ 8BAA9B570F7B4C2400DF4F12 /* GTMHotKeyTextFieldTest.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8BAA9B560F7B4C2400DF4F12 /* GTMHotKeyTextFieldTest.xib */; };
+ 8BAA9E380F7C19D500DF4F12 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8BAA9E360F7C19D500DF4F12 /* MainMenu.xib */; };
+ 8BAA9EF20F7C2AB500DF4F12 /* GTMCarbonEventTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B3E29290EEB53F3000681D8 /* GTMCarbonEventTest.m */; };
+ 8BAA9EF30F7C2AB500DF4F12 /* GTMGetURLHandlerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B8B10FF0EEB8CD000E543D0 /* GTMGetURLHandlerTest.m */; };
+ 8BAA9EF40F7C2AB500DF4F12 /* GTMLargeTypeWindowTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B1801A40E2533DB00280961 /* GTMLargeTypeWindowTest.m */; };
+ 8BAA9EF50F7C2AB500DF4F12 /* GTMLinearRGBShadingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F43E44790D4918B20041161F /* GTMLinearRGBShadingTest.m */; };
+ 8BAA9EF60F7C2AB500DF4F12 /* GTMLoginItemsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F43DCEC60D47BEA000959A62 /* GTMLoginItemsTest.m */; };
+ 8BAA9EF70F7C2AB500DF4F12 /* GTMNSBezierPath+CGPathTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F428FF010D48E55E00382ED1 /* GTMNSBezierPath+CGPathTest.m */; };
+ 8BAA9EF80F7C2AB500DF4F12 /* GTMNSBezierPath+RoundRectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F48FE2830D198D0E009257D2 /* GTMNSBezierPath+RoundRectTest.m */; };
+ 8BAA9EF90F7C2AB500DF4F12 /* GTMNSBezierPath+ShadingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F47F1C110D490BC000925B8F /* GTMNSBezierPath+ShadingTest.m */; };
+ 8BAA9EFA0F7C2AB500DF4F12 /* GTMNSColor+LuminanceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F511DF50F4B0378009F41B6 /* GTMNSColor+LuminanceTest.m */; };
+ 8BAA9EFB0F7C2AB500DF4F12 /* GTMNSImage+ScalingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F3EB3930E5E0A2100A7A75E /* GTMNSImage+ScalingTest.m */; };
+ 8BAA9EFC0F7C2AB500DF4F12 /* GTMNSWorkspace+RunningTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA01B5F0F144BE500926923 /* GTMNSWorkspace+RunningTest.m */; };
+ 8BAA9EFD0F7C2AB500DF4F12 /* GTMThemeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F511DF70F4B0378009F41B6 /* GTMThemeTest.m */; };
8BC045C20DAE899100C2D1CA /* GTMGeometryUtilsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F48FE2800D198D0E009257D2 /* GTMGeometryUtilsTest.m */; };
8BC046B90DAE8C4B00C2D1CA /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BC046B80DAE8C4B00C2D1CA /* ApplicationServices.framework */; };
8BC04CD80DB003D800C2D1CA /* GTMMethodCheck.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B6F31F40DA3489B0052CA40 /* GTMMethodCheck.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -188,8 +192,6 @@
F425977F0E23FE43003BEA3E /* GTMNSString+FindFolderTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F42597780E23FE3A003BEA3E /* GTMNSString+FindFolderTest.m */; };
F428FF030D48E55E00382ED1 /* GTMNSBezierPath+CGPath.h in Headers */ = {isa = PBXBuildFile; fileRef = F428FEFF0D48E55E00382ED1 /* GTMNSBezierPath+CGPath.h */; settings = {ATTRIBUTES = (Public, ); }; };
F428FF040D48E55E00382ED1 /* GTMNSBezierPath+CGPath.m in Sources */ = {isa = PBXBuildFile; fileRef = F428FF000D48E55E00382ED1 /* GTMNSBezierPath+CGPath.m */; };
- F428FF090D48E57300382ED1 /* GTMNSBezierPath+CGPathTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F428FF010D48E55E00382ED1 /* GTMNSBezierPath+CGPathTest.m */; };
- F42E082F0D19991400D5DDE0 /* GTMNSBezierPath+RoundRectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F48FE2830D198D0E009257D2 /* GTMNSBezierPath+RoundRectTest.m */; };
F42E08330D19992100D5DDE0 /* GTMNSString+HTMLTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F48FE2900D198D24009257D2 /* GTMNSString+HTMLTest.m */; };
F42E08340D19992100D5DDE0 /* GTMSystemVersionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F48FE2E10D198E4C009257D2 /* GTMSystemVersionTest.m */; };
F42E08610D199A2B00D5DDE0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
@@ -223,10 +225,8 @@
F437F5620D50BC1D00F5C3A4 /* GTMRegexTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F437F55C0D50BC0A00F5C3A4 /* GTMRegexTest.m */; };
F43DCDCD0D4796C600959A62 /* GTMLoginItems.h in Headers */ = {isa = PBXBuildFile; fileRef = F43DCDCB0D4796C600959A62 /* GTMLoginItems.h */; settings = {ATTRIBUTES = (Public, ); }; };
F43DCDCE0D4796C600959A62 /* GTMLoginItems.m in Sources */ = {isa = PBXBuildFile; fileRef = F43DCDCC0D4796C600959A62 /* GTMLoginItems.m */; };
- F43DCEC70D47BEA000959A62 /* GTMLoginItemsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F43DCEC60D47BEA000959A62 /* GTMLoginItemsTest.m */; };
F43E447A0D4918B20041161F /* GTMLinearRGBShading.h in Headers */ = {isa = PBXBuildFile; fileRef = F43E44770D4918B20041161F /* GTMLinearRGBShading.h */; settings = {ATTRIBUTES = (Public, ); }; };
F43E447B0D4918B20041161F /* GTMLinearRGBShading.m in Sources */ = {isa = PBXBuildFile; fileRef = F43E44780D4918B20041161F /* GTMLinearRGBShading.m */; };
- F43E447F0D4918BC0041161F /* GTMLinearRGBShadingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F43E44790D4918B20041161F /* GTMLinearRGBShadingTest.m */; };
F43E4C280D4E361D0041161F /* GTMNSString+XML.h in Headers */ = {isa = PBXBuildFile; fileRef = F43E4C250D4E361D0041161F /* GTMNSString+XML.h */; settings = {ATTRIBUTES = (Public, ); }; };
F43E4C290D4E361D0041161F /* GTMNSString+XML.m in Sources */ = {isa = PBXBuildFile; fileRef = F43E4C260D4E361D0041161F /* GTMNSString+XML.m */; };
F43E4C2D0D4E36230041161F /* GTMNSString+XMLTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F43E4C270D4E361D0041161F /* GTMNSString+XMLTest.m */; };
@@ -241,7 +241,6 @@
F47A798B0D746EFC002302AB /* GTMScriptRunnerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F47A79870D746EE9002302AB /* GTMScriptRunnerTest.m */; };
F47F1C120D490BC000925B8F /* GTMNSBezierPath+Shading.h in Headers */ = {isa = PBXBuildFile; fileRef = F47F1C0D0D490BC000925B8F /* GTMNSBezierPath+Shading.h */; settings = {ATTRIBUTES = (Public, ); }; };
F47F1C130D490BC000925B8F /* GTMNSBezierPath+Shading.m in Sources */ = {isa = PBXBuildFile; fileRef = F47F1C0E0D490BC000925B8F /* GTMNSBezierPath+Shading.m */; };
- F47F1C1B0D490BD200925B8F /* GTMNSBezierPath+ShadingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F47F1C110D490BC000925B8F /* GTMNSBezierPath+ShadingTest.m */; };
F47F1C750D490E5C00925B8F /* GTMShading.h in Headers */ = {isa = PBXBuildFile; fileRef = F47F1C740D490E5C00925B8F /* GTMShading.h */; settings = {ATTRIBUTES = (Public, ); }; };
F47F1D300D4914AD00925B8F /* GTMCalculatedRange.h in Headers */ = {isa = PBXBuildFile; fileRef = F47F1D2D0D4914AD00925B8F /* GTMCalculatedRange.h */; settings = {ATTRIBUTES = (Public, ); }; };
F47F1D310D4914AD00925B8F /* GTMCalculatedRange.m in Sources */ = {isa = PBXBuildFile; fileRef = F47F1D2E0D4914AD00925B8F /* GTMCalculatedRange.m */; };
@@ -277,13 +276,6 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
- 8B45A0380DA46A20001148C5 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 8B45A0270DA4696C001148C5;
- remoteInfo = "UnitTest - UnitTesting";
- };
8B45A2D30DA51A0E001148C5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -298,12 +290,12 @@
remoteGlobalIDString = F42E086C0D199A5B00D5DDE0;
remoteInfo = GTM;
};
- F41D254E0DB9067C00774EEB /* PBXContainerItemProxy */ = {
+ 8BAA9A340F7AF50600DF4F12 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
- remoteGlobalIDString = 8B45A0270DA4696C001148C5;
- remoteInfo = "UnitTest - UnitTesting";
+ remoteGlobalIDString = 8B45A2890DA49B99001148C5;
+ remoteInfo = UIUnitTestingHarness;
};
F42E08760D199A9B00D5DDE0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@@ -319,20 +311,6 @@
remoteGlobalIDString = F42E086C0D199A5B00D5DDE0;
remoteInfo = GTM;
};
- F472042C0D33BEB500E9F378 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = F48FE2630D198C1E009257D2;
- remoteInfo = "UnitTest - AppKit";
- };
- F472042E0D33BEB500E9F378 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = F42E08110D19987200D5DDE0;
- remoteInfo = "UnitTest - Foundation";
- };
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
@@ -409,7 +387,6 @@
8B45A2670DA498A0001148C5 /* GTMUnitTestingUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMUnitTestingUtilities.h; sourceTree = "<group>"; };
8B45A2680DA498A0001148C5 /* GTMUnitTestingUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMUnitTestingUtilities.m; sourceTree = "<group>"; };
8B45A28A0DA49B99001148C5 /* GTMUIUnitTestingHarness.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GTMUIUnitTestingHarness.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 8B45A2A60DA49C47001148C5 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
8B45A2A70DA49C47001148C5 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8B45A2A80DA49C47001148C5 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8B45A2DE0DA51A7E001148C5 /* GTMUnitTestingTest.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = GTMUnitTestingTest.nib; sourceTree = "<group>"; };
@@ -450,6 +427,9 @@
8BA01B5B0F144BD800926923 /* GTMNSWorkspace+Running.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSWorkspace+Running.m"; sourceTree = "<group>"; };
8BA01B5C0F144BD800926923 /* GTMNSWorkspace+Running.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSWorkspace+Running.h"; sourceTree = "<group>"; };
8BA01B5F0F144BE500926923 /* GTMNSWorkspace+RunningTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSWorkspace+RunningTest.m"; sourceTree = "<group>"; };
+ 8BAA9B540F7B4A5000DF4F12 /* GTMHotKeyTextFieldTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHotKeyTextFieldTest.h; sourceTree = "<group>"; };
+ 8BAA9B560F7B4C2400DF4F12 /* GTMHotKeyTextFieldTest.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GTMHotKeyTextFieldTest.xib; sourceTree = "<group>"; };
+ 8BAA9E370F7C19D500DF4F12 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.xib; sourceTree = "<group>"; };
8BC046B80DAE8C4B00C2D1CA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
8BC04D140DB0061300C2D1CA /* RunMacOSUnitTests.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = RunMacOSUnitTests.sh; sourceTree = "<group>"; };
8BE2836B0DED0F130035B3F8 /* GTMFourCharCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMFourCharCode.m; sourceTree = "<group>"; };
@@ -708,7 +688,7 @@
8B45A2A20DA49C47001148C5 /* GTMUIUnitTestingHarness */ = {
isa = PBXGroup;
children = (
- 8B45A2A50DA49C47001148C5 /* MainMenu.nib */,
+ 8BAA9E360F7C19D500DF4F12 /* MainMenu.xib */,
8B45A2A70DA49C47001148C5 /* Info.plist */,
8B45A2A80DA49C47001148C5 /* main.m */,
);
@@ -780,7 +760,9 @@
8B8B10FF0EEB8CD000E543D0 /* GTMGetURLHandlerTest.m */,
F4A420EC0EDDF8E000397A11 /* GTMHotKeyTextField.h */,
F4A420ED0EDDF8E000397A11 /* GTMHotKeyTextField.m */,
+ 8BAA9B540F7B4A5000DF4F12 /* GTMHotKeyTextFieldTest.h */,
F4A420EE0EDDF8E000397A11 /* GTMHotKeyTextFieldTest.m */,
+ 8BAA9B560F7B4C2400DF4F12 /* GTMHotKeyTextFieldTest.xib */,
8B1801A10E2533D500280961 /* GTMLargeTypeWindow.h */,
8B1801A00E2533D500280961 /* GTMLargeTypeWindow.m */,
8B1801A40E2533DB00280961 /* GTMLargeTypeWindowTest.m */,
@@ -1183,7 +1165,6 @@
F42E08690D199A5B00D5DDE0 /* Resources */,
F42E086A0D199A5B00D5DDE0 /* Sources */,
F42E086B0D199A5B00D5DDE0 /* Frameworks */,
- F4D9A60D0F6B6E3000BB52C5 /* Clean gcov data */,
);
buildRules = (
);
@@ -1206,8 +1187,8 @@
buildRules = (
);
dependencies = (
+ 8BAA9A350F7AF50600DF4F12 /* PBXTargetDependency */,
F42E08770D199A9B00D5DDE0 /* PBXTargetDependency */,
- F41D254F0DB9067C00774EEB /* PBXTargetDependency */,
);
name = "UnitTest - AppKit";
productName = "UnitTest - AppKit";
@@ -1264,7 +1245,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 8B45A2AA0DA49C47001148C5 /* MainMenu.nib in Resources */,
+ 8BAA9E380F7C19D500DF4F12 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1298,6 +1279,7 @@
8B1801B30E25341B00280961 /* GTMLargeTypeWindowShortTextTest.gtmUTState in Resources */,
8B1802420E25592200280961 /* GTMLargeTypeWindowMediumTextTest.gtmUTState in Resources */,
7F3EB5540E5F0B0400A7A75E /* GTMUnitTestingImage.tiff in Resources */,
+ 8BAA9B570F7B4C2400DF4F12 /* GTMHotKeyTextFieldTest.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1315,9 +1297,9 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Nuke coverage data earch run\nexport GTM_REMOVE_GCOV_DATA=1\n# Run the unit tests in this test bundle.\n\"${SRCROOT}/UnitTesting/RunMacOSUnitTests.sh\"";
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SRCROOT}/UnitTesting/RunMacOSUnitTests.sh\"";
};
- F42E081D0D19987200D5DDE0 /* ShellScript */ = {
+ 8BAA9A2B0F7AF44A00DF4F12 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -1328,9 +1310,9 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Nuke coverage data earch run\nexport GTM_REMOVE_GCOV_DATA=1\n# Run the unit tests in this test bundle.\n\"${SRCROOT}/UnitTesting/RunMacOSUnitTests.sh\"";
+ shellScript = "GTMXcodeNote() {\n echo ${ThisScript}:${1}: note: GTM ${2}\n}\n\nGTMXcodeNote ${LINENO} \"Removing gcov data files from ${CONFIGURATION_TEMP_DIR}\"\n( cd \"${CONFIGURATION_TEMP_DIR}\" && find . -type f -name \"*.gcda\" -print0 | xargs -0 rm -f )\n\nxcodebuild -project \"GTM.xcodeproj\" -target \"UnitTest - UnitTesting\" -configuration \"${CONFIGURATION}\" GTM_DO_NOT_REMOVE_GCOV_DATA=1\nxcodebuild -project \"GTM.xcodeproj\" -target \"UnitTest - Foundation\" -configuration \"${CONFIGURATION}\" GTM_DO_NOT_REMOVE_GCOV_DATA=1\nxcodebuild -project \"GTM.xcodeproj\" -target \"UnitTest - AppKit\" -configuration \"${CONFIGURATION}\" GTM_DO_NOT_REMOVE_GCOV_DATA=1";
};
- F48FE2620D198C1E009257D2 /* ShellScript */ = {
+ F42E081D0D19987200D5DDE0 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -1341,22 +1323,20 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Nuke coverage data earch run\nexport GTM_REMOVE_GCOV_DATA=1\n# Run the unit tests in this test bundle.\n\"${SRCROOT}/UnitTesting/RunMacOSUnitTests.sh\"\n";
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SRCROOT}/UnitTesting/RunMacOSUnitTests.sh\"";
};
- F4D9A60D0F6B6E3000BB52C5 /* Clean gcov data */ = {
+ F48FE2620D198C1E009257D2 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
- name = "Clean gcov data";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Since the unittests link the framework, we just nuke any gcda's each time\n# we build to be sure we get coverage data for the unittesting runs.\n\nOBJ_FILE_DIR_VAR=\"${OBJECT_FILE_DIR}-${CURRENT_VARIANT}\"\nif [ ${OBJ_FILE_DIR_VAR} != \"-\" ]; then\n if [ -d ${OBJ_FILE_DIR_VAR} ]; then\n (cd ${OBJ_FILE_DIR_VAR} && \\\n find . -type f -name \"*.gcda\" -print0 | xargs -0 rm -f )\n fi\nfi\n";
- showEnvVarsInLog = 0;
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SRCROOT}/UnitTesting/RunMacOSUnitTests.sh\"\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -1508,36 +1488,31 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 7F511E010F4B03B4009F41B6 /* GTMNSColor+LuminanceTest.m in Sources */,
- 7F511E020F4B03BC009F41B6 /* GTMThemeTest.m in Sources */,
- F42E082F0D19991400D5DDE0 /* GTMNSBezierPath+RoundRectTest.m in Sources */,
F42E09450D199BA400D5DDE0 /* GTMNSObject+UnitTesting.m in Sources */,
- F43DCEC70D47BEA000959A62 /* GTMLoginItemsTest.m in Sources */,
- F428FF090D48E57300382ED1 /* GTMNSBezierPath+CGPathTest.m in Sources */,
- F47F1C1B0D490BD200925B8F /* GTMNSBezierPath+ShadingTest.m in Sources */,
- F43E447F0D4918BC0041161F /* GTMLinearRGBShadingTest.m in Sources */,
8B5547B90DB3BB220014CC1C /* GTMAppKit+UnitTesting.m in Sources */,
8B7DCBC10DFF0F7F0017E983 /* GTMMethodCheck.m in Sources */,
8B7DCBED0DFF1A4F0017E983 /* GTMUnitTestDevLog.m in Sources */,
8B7DCE190DFF39850017E983 /* GTMSenTestCase.m in Sources */,
- 7F3EB3940E5E0A2100A7A75E /* GTMNSImage+ScalingTest.m in Sources */,
- 7F3EB5870E5F0CBB00A7A75E /* GTMLargeTypeWindowTest.m in Sources */,
8B8B10290EEB8B1600E543D0 /* GTMHotKeyTextFieldTest.m in Sources */,
- 8B8B102A0EEB8B2900E543D0 /* GTMCarbonEventTest.m in Sources */,
8B8B10FD0EEB8BC300E543D0 /* GTMUnitTestingUtilities.m in Sources */,
- 8B8B11000EEB8CD000E543D0 /* GTMGetURLHandlerTest.m in Sources */,
- 8BA01B600F144BE500926923 /* GTMNSWorkspace+RunningTest.m in Sources */,
+ 8BAA9EF20F7C2AB500DF4F12 /* GTMCarbonEventTest.m in Sources */,
+ 8BAA9EF30F7C2AB500DF4F12 /* GTMGetURLHandlerTest.m in Sources */,
+ 8BAA9EF40F7C2AB500DF4F12 /* GTMLargeTypeWindowTest.m in Sources */,
+ 8BAA9EF50F7C2AB500DF4F12 /* GTMLinearRGBShadingTest.m in Sources */,
+ 8BAA9EF60F7C2AB500DF4F12 /* GTMLoginItemsTest.m in Sources */,
+ 8BAA9EF70F7C2AB500DF4F12 /* GTMNSBezierPath+CGPathTest.m in Sources */,
+ 8BAA9EF80F7C2AB500DF4F12 /* GTMNSBezierPath+RoundRectTest.m in Sources */,
+ 8BAA9EF90F7C2AB500DF4F12 /* GTMNSBezierPath+ShadingTest.m in Sources */,
+ 8BAA9EFA0F7C2AB500DF4F12 /* GTMNSColor+LuminanceTest.m in Sources */,
+ 8BAA9EFB0F7C2AB500DF4F12 /* GTMNSImage+ScalingTest.m in Sources */,
+ 8BAA9EFC0F7C2AB500DF4F12 /* GTMNSWorkspace+RunningTest.m in Sources */,
+ 8BAA9EFD0F7C2AB500DF4F12 /* GTMThemeTest.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
- 8B45A0390DA46A20001148C5 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 8B45A0270DA4696C001148C5 /* UnitTest - UnitTesting */;
- targetProxy = 8B45A0380DA46A20001148C5 /* PBXContainerItemProxy */;
- };
8B45A2D40DA51A0E001148C5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8B45A2890DA49B99001148C5 /* UIUnitTestingHarness */;
@@ -1548,10 +1523,10 @@
target = F42E086C0D199A5B00D5DDE0 /* GTM */;
targetProxy = 8B7DCBA30DFF0EFB0017E983 /* PBXContainerItemProxy */;
};
- F41D254F0DB9067C00774EEB /* PBXTargetDependency */ = {
+ 8BAA9A350F7AF50600DF4F12 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = 8B45A0270DA4696C001148C5 /* UnitTest - UnitTesting */;
- targetProxy = F41D254E0DB9067C00774EEB /* PBXContainerItemProxy */;
+ target = 8B45A2890DA49B99001148C5 /* UIUnitTestingHarness */;
+ targetProxy = 8BAA9A340F7AF50600DF4F12 /* PBXContainerItemProxy */;
};
F42E08770D199A9B00D5DDE0 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
@@ -1563,25 +1538,16 @@
target = F42E086C0D199A5B00D5DDE0 /* GTM */;
targetProxy = F42E08780D199AA600D5DDE0 /* PBXContainerItemProxy */;
};
- F472042D0D33BEB500E9F378 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = F48FE2630D198C1E009257D2 /* UnitTest - AppKit */;
- targetProxy = F472042C0D33BEB500E9F378 /* PBXContainerItemProxy */;
- };
- F472042F0D33BEB500E9F378 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = F42E08110D19987200D5DDE0 /* UnitTest - Foundation */;
- targetProxy = F472042E0D33BEB500E9F378 /* PBXContainerItemProxy */;
- };
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
- 8B45A2A50DA49C47001148C5 /* MainMenu.nib */ = {
+ 8BAA9E360F7C19D500DF4F12 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
- 8B45A2A60DA49C47001148C5 /* English */,
+ 8BAA9E370F7C19D500DF4F12 /* English */,
);
- name = MainMenu.nib;
+ name = MainMenu.xib;
+ path = ../..;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt
index 92dbdba..2c6fd75 100644
--- a/ReleaseNotes.txt
+++ b/ReleaseNotes.txt
@@ -258,9 +258,9 @@ Changes since 1.5.1
- Added GTMTheme for doing product wide theme modifications.
-- The Run*UnitTest.sh script now support an env var to have them delete the
- current target/configs *.gcda files to avoid coverage data warning when you
- edit source.
+- The Run*UnitTest.sh script now delete the current projects *.gcda files to
+ avoid coverage data warning when you edit source. If you do not want this to
+ occur, you can set GTM_DO_NOT_REMOVE_GCOV_DATA to a non-zero value.
- Added OBJC_DEBUG_UNLOAD=YES, and OBJC_DEBUG_NIL_SYNC=YES to our unittest shell
scripts to try and flush out some more bugs. We have intentionally NOT turned
diff --git a/UnitTesting/GTMSenTestCase.m b/UnitTesting/GTMSenTestCase.m
index 8482c5a..99b9db0 100644
--- a/UnitTesting/GTMSenTestCase.m
+++ b/UnitTesting/GTMSenTestCase.m
@@ -312,6 +312,8 @@ NSString *const SenTestLineNumberKey = @"SenTestLineNumberKey";
// Don't want to get leaks on the iPhone Device as the device doesn't
// have 'leaks'. The simulator does though.
+// COV_NF_START
+// We don't have leak checking on by default, so this won't be hit.
static void _GTMRunLeaks(void) {
// This is an atexit handler. It runs leaks for us to check if we are
// leaking anything in our tests.
@@ -338,6 +340,7 @@ static void _GTMRunLeaks(void) {
fflush(stderr);
}
}
+// COV_NF_END
static __attribute__((constructor)) void _GTMInstallLeaks(void) {
BOOL checkLeaks = YES;
@@ -347,15 +350,16 @@ static __attribute__((constructor)) void _GTMInstallLeaks(void) {
if (checkLeaks) {
checkLeaks = getenv("GTM_ENABLE_LEAKS") ? YES : NO;
if (checkLeaks) {
- if (checkLeaks) {
- fprintf(stderr, "Leak Checking Enabled\n");
- fflush(stderr);
- int ret = atexit(&_GTMRunLeaks);
- _GTMDevAssert(ret == 0,
- @"Unable to install _GTMRunLeaks as an atexit handler (%d)",
- errno);
- }
- }
+ // COV_NF_START
+ // We don't have leak checking on by default, so this won't be hit.
+ fprintf(stderr, "Leak Checking Enabled\n");
+ fflush(stderr);
+ int ret = atexit(&_GTMRunLeaks);
+ _GTMDevAssert(ret == 0,
+ @"Unable to install _GTMRunLeaks as an atexit handler (%d)",
+ errno);
+ // COV_NF_END
+ }
}
}
diff --git a/UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.nib/keyedobjects.nib b/UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.nib/keyedobjects.nib
deleted file mode 100644
index 318a7e9..0000000
--- a/UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.nib/keyedobjects.nib
+++ /dev/null
Binary files differ
diff --git a/UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.nib/designable.nib b/UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.xib
index e198162..6cef0cb 100644
--- a/UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.nib/designable.nib
+++ b/UnitTesting/GTMUIUnitTestingHarness/English.lproj/MainMenu.xib
@@ -1,20 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">0</int>
- <string key="IBDocument.SystemVersion">9C31</string>
- <string key="IBDocument.InterfaceBuilderVersion">644</string>
- <string key="IBDocument.AppKitVersion">949.26</string>
- <string key="IBDocument.HIToolboxVersion">352.00</string>
+ <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
+ <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="57"/>
+ <integer value="29"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilderKit</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1021">
@@ -157,8 +166,7 @@
<object class="NSMenuItem" id="632727374">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">Quit NewApplication</string>
- <string key="NSKeyEquiv">q</string>
- <int key="NSKeyEquivModMask">1048576</int>
+ <string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="513340101"/>
@@ -1909,24 +1917,41 @@
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
+ <string key="className">GTMLargeTypeWindow</string>
+ <string key="superclassName">NSPanel</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">copy:</string>
+ <string key="NS.object.0">id</string>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UnitTesting/GTMNSApplication+UnitTesting.h</string>
+ <string key="minorKey">AppKit/GTMLargeTypeWindow.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">NSMenu</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="271775925">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UnitTesting/GTMNSMenu+UnitTesting.h</string>
+ <string key="minorKey">UnitTesting/GTMAppKit+UnitTesting.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">NSControl</string>
+ <reference key="sourceIdentifier" ref="271775925"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSMenu</string>
+ <reference key="sourceIdentifier" ref="271775925"/>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSMenuItem</string>
+ <reference key="sourceIdentifier" ref="271775925"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UnitTesting/GTMNSMenuItem+UnitTesting.h</string>
+ <string key="minorKey">AppKit/GTMCarbonEvent.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@@ -1940,30 +1965,52 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UnitTesting/GTMNSObject+BindingUnitTesting.h</string>
+ <string key="minorKey">Foundation/GTMHTTPServer.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UnitTesting/GTMNSObject+UnitTesting.h</string>
+ <string key="minorKey">Foundation/GTMNSAppleEventDescriptor+Foundation.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UnitTesting/GTMSenTestCase.h</string>
+ <string key="minorKey">Foundation/GTMNSObject+KeyValueObserving.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">NSView</string>
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMCALayer+UnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMNSObject+BindingUnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">UnitTesting/GTMNSView+UnitTesting.h</string>
+ <string key="minorKey">UnitTesting/GTMNSObject+UnitTesting.h</string>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSView</string>
+ <reference key="sourceIdentifier" ref="271775925"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSWindow</string>
+ <reference key="sourceIdentifier" ref="271775925"/>
+ </object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
diff --git a/UnitTesting/RunMacOSUnitTests.sh b/UnitTesting/RunMacOSUnitTests.sh
index 9aa83e4..d184566 100755
--- a/UnitTesting/RunMacOSUnitTests.sh
+++ b/UnitTesting/RunMacOSUnitTests.sh
@@ -43,10 +43,16 @@
# Please feel free to add other symbols as you find them but make sure to
# reference Radars or other bug systems so we can track them.
#
-# GTM_REMOVE_GCOV_DATA
-# Before starting the test, remove any *.gcda files for the current run so
-# you won't get errors when the source file has changed and the data can't
-# be merged.
+# GTM_DO_NOT_REMOVE_GCOV_DATA
+# By default before starting the test, we remove any *.gcda files for the
+# current project build configuration so you won't get errors when a source
+# file has changed and the gcov data can't be merged.
+# We remove all the gcda files for the current configuration for the entire
+# project so that if you are building a test bundle to test another separate
+# bundle we make sure to clean up the files for the test bundle and the bundle
+# that you are testing.
+# If you DO NOT want this to occur, set GTM_DO_NOT_REMOVE_GCOV_DATA to a
+# non-zero value.
#
ScriptDir=$(dirname $(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,"))
@@ -200,11 +206,11 @@ if [ ! $GTM_DISABLE_ZOMBIES ]; then
export NSZombieEnabled=YES
fi
-if [ $GTM_REMOVE_GCOV_DATA ]; then
- if [ "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" != "-" ]; then
- if [ -d "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" ]; then
- GTMXcodeNote ${LINENO} "Removing any .gcda files"
- (cd "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" && \
+if [ ! $GTM_DO_NOT_REMOVE_GCOV_DATA ]; then
+ if [ "${CONFIGURATION_TEMP_DIR}" != "-" ]; then
+ if [ -d "${CONFIGURATION_TEMP_DIR}" ]; then
+ GTMXcodeNote ${LINENO} "Removing gcov data files from ${CONFIGURATION_TEMP_DIR}"
+ (cd "${CONFIGURATION_TEMP_DIR}" && \
find . -type f -name "*.gcda" -print0 | xargs -0 rm -f )
fi
fi
diff --git a/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState b/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState
index 03e611c..525535b 100644
--- a/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState
+++ b/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState
@@ -91,7 +91,7 @@
<key>MenuItemIsSeparator</key>
<false/>
<key>MenuItemKeyEquivalent</key>
- <string>q</string>
+ <string></string>
<key>MenuItemState</key>
<integer>0</integer>
<key>MenuItemTag</key>