| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/mac_util.h" | |
| 6 | |
| 7 #include <ApplicationServices/ApplicationServices.h> | |
| 8 | |
| 9 #include "base/file_path.h" | |
| 10 #include "testing/gtest/include/gtest/gtest.h" | |
| 11 #include "testing/platform_test.h" | |
| 12 | |
| 13 typedef PlatformTest MacUtilTest; | |
| 14 | |
| 15 TEST_F(MacUtilTest, TestFSRef) { | |
| 16 FSRef ref; | |
| 17 std::string path("/System/Library"); | |
| 18 | |
| 19 ASSERT_TRUE(mac_util::FSRefFromPath(path, &ref)); | |
| 20 EXPECT_EQ(path, mac_util::PathFromFSRef(ref)); | |
| 21 } | |
| 22 | |
| 23 TEST_F(MacUtilTest, TestLibraryPath) { | |
| 24 FilePath library_dir = mac_util::GetUserLibraryPath(); | |
| 25 // Make sure the string isn't empty. | |
| 26 EXPECT_FALSE(library_dir.value().empty()); | |
| 27 } | |
| OLD | NEW |