diff options
author | 2013-05-24 18:12:17 +0000 | |
---|---|---|
committer | 2013-05-24 18:12:17 +0000 | |
commit | 1bee03704408fad8df334f6193267774bb21231b (patch) | |
tree | 7f7689554bbfc640da7150bb7fa14f62bc06d78b /gm/gm_expectations.cpp | |
parent | 7070f76b90b098b4713bc0d13dc129adea64d7ef (diff) |
Add path utils, plus a test for it.
SkOSFile:
Added class SkOSPath with functions for
modifying strings representing path names.
OSPathTest.cpp:
Test of the new utilities.
factory.cpp:
Use SkPathJoin.
gmmain and gm_expectations:
Use SkOSPath::SkPathJoin instead of a local version.
skimage_main.cpp:
Use the new location of SkPathJoin and SkBasename.
R=epoger@google.com
Review URL: https://codereview.chromium.org/15747004
git-svn-id: http://skia.googlecode.com/svn/trunk@9277 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/gm_expectations.cpp')
-rw-r--r-- | gm/gm_expectations.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/gm/gm_expectations.cpp b/gm/gm_expectations.cpp index 8138af7890..46cfea1236 100644 --- a/gm/gm_expectations.cpp +++ b/gm/gm_expectations.cpp @@ -37,15 +37,6 @@ namespace skiagm { va_end(args); } - SkString SkPathJoin(const char *rootPath, const char *relativePath) { - SkString result(rootPath); - if (!result.endsWith(SkPATH_SEPARATOR)) { - result.appendUnichar(SkPATH_SEPARATOR); - } - result.append(relativePath); - return result; - } - Json::Value CreateJsonTree(Json::Value expectedResults, Json::Value actualResultsFailed, Json::Value actualResultsFailureIgnored, @@ -194,7 +185,7 @@ namespace skiagm { // IndividualImageExpectationsSource class... Expectations IndividualImageExpectationsSource::get(const char *testName) { - SkString path = SkPathJoin(fRootDir.c_str(), testName); + SkString path = SkOSPath::SkPathJoin(fRootDir.c_str(), testName); SkBitmap referenceBitmap; bool decodedReferenceBitmap = SkImageDecoder::DecodeFile(path.c_str(), &referenceBitmap, |