diff options
Diffstat (limited to 'base/mac_util_unittest.mm')
-rw-r--r-- | base/mac_util_unittest.mm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/base/mac_util_unittest.mm b/base/mac_util_unittest.mm index 676353b..801922a 100644 --- a/base/mac_util_unittest.mm +++ b/base/mac_util_unittest.mm @@ -29,6 +29,22 @@ TEST_F(MacUtilTest, TestFSRef) { EXPECT_EQ(path, PathFromFSRef(ref)); } +TEST_F(MacUtilTest, GetUserDirectoryTest) { + // Try a few keys, make sure they come back with non-empty paths. + FilePath caches_dir; + EXPECT_TRUE(GetUserDirectory(NSCachesDirectory, &caches_dir)); + EXPECT_FALSE(caches_dir.empty()); + + FilePath application_support_dir; + EXPECT_TRUE(GetUserDirectory(NSApplicationSupportDirectory, + &application_support_dir)); + EXPECT_FALSE(application_support_dir.empty()); + + FilePath library_dir; + EXPECT_TRUE(GetUserDirectory(NSLibraryDirectory, &library_dir)); + EXPECT_FALSE(library_dir.empty()); +} + TEST_F(MacUtilTest, TestLibraryPath) { FilePath library_dir = GetUserLibraryPath(); // Make sure the string isn't empty. |