aboutsummaryrefslogtreecommitdiff
path: root/Foundation
diff options
context:
space:
mode:
authorGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-12-29 18:57:18 +0000
committerGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-12-29 18:57:18 +0000
commit84d1232477f398339e48ea504c45048e9328ef9b (patch)
treea9d48903e6bf318840eba1f38b26f68a7560f0ed /Foundation
parent2e8516354aacef064d01425808da06d2cdcb4791 (diff)
- Updated some tests for 10.5.6.
- Updated some tests for debug vs. release differences. (added help on log validation for this). - Some fixes build issues w/ different os versions.
Diffstat (limited to 'Foundation')
-rw-r--r--Foundation/GTMFileSystemKQueue.m2
-rw-r--r--Foundation/GTMNSAppleEventDescriptor+Foundation.m4
-rw-r--r--Foundation/GTMNSAppleEventDescriptor+FoundationTest.m7
-rw-r--r--Foundation/GTMNSArray+Merge.m2
-rw-r--r--Foundation/GTMNSFileManager+CarbonTest.m6
5 files changed, 16 insertions, 5 deletions
diff --git a/Foundation/GTMFileSystemKQueue.m b/Foundation/GTMFileSystemKQueue.m
index e2c399e..050d68f 100644
--- a/Foundation/GTMFileSystemKQueue.m
+++ b/Foundation/GTMFileSystemKQueue.m
@@ -18,7 +18,7 @@
#import "GTMFileSystemKQueue.h"
#import <unistd.h>
-
+#import "GTMDefines.h"
#import "GTMDebugSelectorValidation.h"
diff --git a/Foundation/GTMNSAppleEventDescriptor+Foundation.m b/Foundation/GTMNSAppleEventDescriptor+Foundation.m
index 14f256d..d0c26ec 100644
--- a/Foundation/GTMNSAppleEventDescriptor+Foundation.m
+++ b/Foundation/GTMNSAppleEventDescriptor+Foundation.m
@@ -234,6 +234,10 @@ static NSMutableDictionary *gTypeMap = nil;
return [GTMFourCharCode fourCharCodeWithFourCharCode:[self typeCodeValue]];
}
+- (NSAppleEventDescriptor*)gtm_appleEventDescriptor {
+ return self;
+}
+
@end
@implementation NSObject (GTMAppleEventDescriptorObjectAdditions)
diff --git a/Foundation/GTMNSAppleEventDescriptor+FoundationTest.m b/Foundation/GTMNSAppleEventDescriptor+FoundationTest.m
index 833fd5a..6df19ab 100644
--- a/Foundation/GTMNSAppleEventDescriptor+FoundationTest.m
+++ b/Foundation/GTMNSAppleEventDescriptor+FoundationTest.m
@@ -575,6 +575,13 @@
STAssertEquals([desc descriptorType], (DescType)typeKeyword, nil);
}
+- (void)testDescriptorWithDescriptor {
+ NSAppleEventDescriptor *desc
+ = [NSAppleEventDescriptor descriptorWithString:@"foo"];
+ NSAppleEventDescriptor *desc2 = [desc gtm_appleEventDescriptor];
+ STAssertEqualObjects(desc, desc2, nil);
+}
+
- (void)handleEvent:(NSAppleEventDescriptor*)event
withReply:(NSAppleEventDescriptor*)reply {
gotEvent_ = YES;
diff --git a/Foundation/GTMNSArray+Merge.m b/Foundation/GTMNSArray+Merge.m
index 725aa8a..da58a02 100644
--- a/Foundation/GTMNSArray+Merge.m
+++ b/Foundation/GTMNSArray+Merge.m
@@ -44,7 +44,7 @@
// Sort and merge the contents of |self| with |newArray|.
NSArray *sortedMergedArray = nil;
if ([self count] && [newArray count]) {
- NSMutableArray *mergingArray = [self mutableCopy];
+ NSMutableArray *mergingArray = [[self mutableCopy] autorelease];
[mergingArray sortUsingSelector:comparer];
NSArray *sortedNewArray
= [newArray sortedArrayUsingSelector:comparer];
diff --git a/Foundation/GTMNSFileManager+CarbonTest.m b/Foundation/GTMNSFileManager+CarbonTest.m
index ae58840..76692b0 100644
--- a/Foundation/GTMNSFileManager+CarbonTest.m
+++ b/Foundation/GTMNSFileManager+CarbonTest.m
@@ -48,8 +48,8 @@
STAssertEqualObjects(path, path4, nil);
// Failure cases
- [GTMUnitTestDevLog expectPattern:@"DebugAssert: "
- @"GoogleToolboxForMac: FSPathMakeRef.*"];
+ [GTMUnitTestDevLogDebug expectPattern:@"DebugAssert: "
+ @"GoogleToolboxForMac: FSPathMakeRef.*"];
STAssertNULL([fileManager gtm_FSRefForPath:@"/ptah/taht/dosent/esixt/"],
nil);
@@ -59,7 +59,7 @@
STAssertNil([fileManager gtm_pathFromAliasData:nil], nil);
STAssertNil([fileManager gtm_pathFromAliasData:[NSData data]], nil);
- [GTMUnitTestDevLog expectPattern:@"DebugAssert: "
+ [GTMUnitTestDevLogDebug expectPattern:@"DebugAssert: "
@"GoogleToolboxForMac: FSPathMakeRef.*"];
STAssertNil([fileManager gtm_aliasDataForPath:@"/ptah/taht/dosent/esixt/"], nil);
STAssertNil([fileManager gtm_aliasDataForPath:@""], nil);