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

Unified Diff: tests/OSPathTest.cpp

Issue 428443002: Cleanup: Rename SkOSPath functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 years, 5 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
« no previous file with comments | « tests/ImageDecodingTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/OSPathTest.cpp
diff --git a/tests/OSPathTest.cpp b/tests/OSPathTest.cpp
index d36b7cb0cf08c1244599331cc612b6684d78a998..1452c3852e499e23aa542f5af1e6917ff064cf42 100644
--- a/tests/OSPathTest.cpp
+++ b/tests/OSPathTest.cpp
@@ -10,9 +10,9 @@
#include "Test.h"
/**
- * Test SkPathJoin and SkBasename.
- * Will use SkPathJoin to append filename to dir, test that it works correctly,
- * and tests using SkBasename on the result.
+ * Test SkOSPath::Join and SkOSPath::Basename.
+ * Will use SkOSPath::Join to append filename to dir, test that it works correctly,
+ * and tests using SkOSPath::Basename on the result.
* @param reporter Reporter for test conditions.
* @param dir String representing the path to a folder. May or may not
* end with SkPATH_SEPARATOR.
@@ -24,10 +24,10 @@ static void test_dir_with_file(skiatest::Reporter* reporter, SkString dir,
// If filename contains SkPATH_SEPARATOR, the tests will fail.
SkASSERT(!filename.contains(SkPATH_SEPARATOR));
- // Tests for SkOSPath::SkPathJoin and SkOSPath::SkBasename
+ // Tests for SkOSPath::Join and SkOSPath::Basename
// fullName should be "dir<SkPATH_SEPARATOR>file"
- SkString fullName = SkOSPath::SkPathJoin(dir.c_str(), filename.c_str());
+ SkString fullName = SkOSPath::Join(dir.c_str(), filename.c_str());
// fullName should be the combined size of dir and file, plus one if
// dir did not include the final path separator.
@@ -37,7 +37,7 @@ static void test_dir_with_file(skiatest::Reporter* reporter, SkString dir,
}
REPORTER_ASSERT(reporter, fullName.size() == expectedSize);
- SkString basename = SkOSPath::SkBasename(fullName.c_str());
+ SkString basename = SkOSPath::Basename(fullName.c_str());
// basename should be the same as filename
REPORTER_ASSERT(reporter, basename.equals(filename));
@@ -46,7 +46,7 @@ static void test_dir_with_file(skiatest::Reporter* reporter, SkString dir,
REPORTER_ASSERT(reporter, !basename.contains(SkPATH_SEPARATOR));
// Now take the basename of filename, which should be the same as filename.
- basename = SkOSPath::SkBasename(filename.c_str());
+ basename = SkOSPath::Basename(filename.c_str());
REPORTER_ASSERT(reporter, basename.equals(filename));
}
@@ -71,15 +71,15 @@ DEF_TEST(OSPath, reporter) {
// Basename of a directory with a path separator at the end is empty.
dir.appendUnichar(SkPATH_SEPARATOR);
- SkString baseOfDir = SkOSPath::SkBasename(dir.c_str());
+ SkString baseOfDir = SkOSPath::Basename(dir.c_str());
REPORTER_ASSERT(reporter, baseOfDir.size() == 0);
// Basename of NULL is an empty string.
- SkString empty = SkOSPath::SkBasename(NULL);
+ SkString empty = SkOSPath::Basename(NULL);
REPORTER_ASSERT(reporter, empty.size() == 0);
// Test that NULL can be used for the directory and filename.
- SkString emptyPath = SkOSPath::SkPathJoin(NULL, NULL);
+ SkString emptyPath = SkOSPath::Join(NULL, NULL);
REPORTER_ASSERT(reporter, emptyPath.size() == 1);
REPORTER_ASSERT(reporter, emptyPath.contains(SkPATH_SEPARATOR));
}
« no previous file with comments | « tests/ImageDecodingTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698