aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMPathTest.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-06-14 12:00:23 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-06-14 12:00:23 +0000
commita43107b29c2236d47e447c9039674b9040a9ec25 (patch)
tree10ced72db2d8b7ad7195164aa1cf915e3288313f /Foundation/GTMPathTest.m
parentf1e548b1e810a7557e8772b67bc181b7743c694f (diff)
[Author: thomasvl]
Pile of fixes for trunk version of clang. R=dmaclach DELTA=59 (26 added, 0 deleted, 33 changed)
Diffstat (limited to 'Foundation/GTMPathTest.m')
-rw-r--r--Foundation/GTMPathTest.m13
1 files changed, 10 insertions, 3 deletions
diff --git a/Foundation/GTMPathTest.m b/Foundation/GTMPathTest.m
index 59e3199..308cc73 100644
--- a/Foundation/GTMPathTest.m
+++ b/Foundation/GTMPathTest.m
@@ -45,7 +45,11 @@
// Make sure it's safe to remove this directory before nuking it.
STAssertNotNil(testDirectory_, nil);
STAssertNotEqualObjects(testDirectory_, @"/", nil);
+#if GTM_MACOSX_SDK && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
[[NSFileManager defaultManager] removeFileAtPath:testDirectory_ handler:nil];
+#else
+ [[NSFileManager defaultManager] removeItemAtPath:testDirectory_ error:NULL];
+#endif
[testDirectory_ release];
}
@@ -136,7 +140,8 @@
STAssertEqualObjects([path name], @"foo", nil);
// filePosixPermissions has odd return types in different SDKs, so we use
// STAssertTrue to avoid the macros type checks from choking us.
- STAssertTrue([[path attributes] filePosixPermissions] == 0555, nil);
+ STAssertTrue([[path attributes] filePosixPermissions] == 0555,
+ @"got %o", (int)[[path attributes] filePosixPermissions]);
STAssertTrue([path isDirectory], nil);
STAssertFalse([path isRoot], nil);
@@ -148,14 +153,16 @@
path = [tmp createDirectoryName:@"foo" mode:0555];
STAssertNotNil(path, nil);
STAssertEqualObjects([path name], @"foo", nil);
- STAssertTrue([[path attributes] filePosixPermissions] == 0555, nil);
+ STAssertTrue([[path attributes] filePosixPermissions] == 0555,
+ @"got %o", (int)[[path attributes] filePosixPermissions]);
STAssertTrue([path isDirectory], nil);
STAssertFalse([path isRoot], nil);
GTMPath *foo = [GTMPath pathWithFullPath:fooPath];
STAssertNotNil(foo, nil);
STAssertEqualObjects([path name], @"foo", nil);
- STAssertTrue([[path attributes] filePosixPermissions] == 0555, nil);
+ STAssertTrue([[path attributes] filePosixPermissions] == 0555,
+ @"got %o", (int)[[path attributes] filePosixPermissions]);
STAssertTrue([path isDirectory], nil);
STAssertFalse([path isRoot], nil);
}