Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: base/mac/foundation_util_unittest.mm

Issue 9346013: Publish app shortcuts on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/mac/foundation_util_unittest.mm
diff --git a/base/mac/foundation_util_unittest.mm b/base/mac/foundation_util_unittest.mm
index 7405691508abce74dccc195bc3f0600068dc0396..3e7730c0584000c0f587947de17c5586f24f7e0d 100644
--- a/base/mac/foundation_util_unittest.mm
+++ b/base/mac/foundation_util_unittest.mm
@@ -5,9 +5,11 @@
#include "base/mac/foundation_util.h"
#include "base/basictypes.h"
+#include "base/file_path.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "testing/gtest/include/gtest/gtest.h"
+#import "testing/gtest_mac.h"
TEST(FoundationUtilTest, CFCast) {
// Build out the CF types to be tested as empty containers.
@@ -319,3 +321,14 @@ TEST(FoundationUtilTest, GetValueFromDictionary) {
EXPECT_FALSE(base::mac::GetValueFromDictionary<CFStringRef>(test_dict,
CFSTR("one")));
}
+
+TEST(FoundationUtilTest, FilePathToNSString) {
Mark Mentovai 2012/02/08 04:29:04 Thanks for providing tests!
+ EXPECT_NSEQ(nil, base::mac::FilePathToNSString(FilePath()));
+ EXPECT_NSEQ(@"/a/b", base::mac::FilePathToNSString(FilePath("/a/b")));
+}
+
+TEST(FoundationUtilTest, NSStringToFilePath) {
+ EXPECT_EQ(FilePath(), base::mac::NSStringToFilePath(nil));
+ EXPECT_EQ(FilePath(), base::mac::NSStringToFilePath(@""));
+ EXPECT_EQ(FilePath("/a/b"), base::mac::NSStringToFilePath(@"/a/b"));
+}

Powered by Google App Engine
This is Rietveld 408576698