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

Unified Diff: tests/PictureUtilsTest.cpp

Issue 321693002: Cleanup: Delete sk_tools::get_basename() in favor of SkOSPath::SkBasename(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rm is_path_seperator() Created 6 years, 6 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 | « no previous file | tools/bench_pictures_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureUtilsTest.cpp
diff --git a/tests/PictureUtilsTest.cpp b/tests/PictureUtilsTest.cpp
index 069e852e9acd265e215b0fef43d87fd7d3f8add1..9214d07cff43a10150e21fb245298c1179c77bb6 100644
--- a/tests/PictureUtilsTest.cpp
+++ b/tests/PictureUtilsTest.cpp
@@ -5,48 +5,15 @@
* found in the LICENSE file.
*/
+#include "picture_utils.h"
+
#include "SkString.h"
#include "Test.h"
-#include "picture_utils.h"
-static void test_filepath_creation(skiatest::Reporter* reporter) {
+DEF_TEST(PictureUtils, reporter) {
SkString result;
SkString filename("test");
SkString dir("test/path");
sk_tools::make_filepath(&result, dir, filename);
REPORTER_ASSERT(reporter, result.equals("test/path/test"));
}
-
-static void test_get_basename(skiatest::Reporter* reporter) {
- SkString result;
- SkString path("/path/basename");
- sk_tools::get_basename(&result, path);
- REPORTER_ASSERT(reporter, result.equals("basename"));
-
- result.reset();
- path.set("/path/dir/");
- sk_tools::get_basename(&result, path);
- REPORTER_ASSERT(reporter, result.equals("dir"));
-
- result.reset();
- path.set("path");
- sk_tools::get_basename(&result, path);
- REPORTER_ASSERT(reporter, result.equals("path"));
-
-#if defined(SK_BUILD_FOR_WIN)
- result.reset();
- path.set("path\\winbasename");
- sk_tools::get_basename(&result, path);
- REPORTER_ASSERT(reporter, result.equals("winbasename"));
-
- result.reset();
- path.set("path\\windir\\");
- sk_tools::get_basename(&result, path);
- REPORTER_ASSERT(reporter, result.equals("windir"));
-#endif
-}
-
-DEF_TEST(PictureUtils, reporter) {
- test_filepath_creation(reporter);
- test_get_basename(reporter);
-}
« no previous file with comments | « no previous file | tools/bench_pictures_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698