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

Side by Side Diff: gm/gm_expectations.h

Issue 15747004: Add path utils, plus a test for it. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove unnecessary changes. Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #ifndef gm_expectations_DEFINED 7 #ifndef gm_expectations_DEFINED
8 #define gm_expectations_DEFINED 8 #define gm_expectations_DEFINED
9 9
10 #include "gm.h" 10 #include "gm.h"
(...skipping 23 matching lines...) Expand all
34 typedef Json::UInt64 Checksum; 34 typedef Json::UInt64 Checksum;
35 static inline Json::Value asJsonValue(Checksum checksum) { 35 static inline Json::Value asJsonValue(Checksum checksum) {
36 return checksum; 36 return checksum;
37 } 37 }
38 static inline Checksum asChecksum(Json::Value jsonValue) { 38 static inline Checksum asChecksum(Json::Value jsonValue) {
39 return jsonValue.asUInt64(); 39 return jsonValue.asUInt64();
40 } 40 }
41 41
42 void gm_fprintf(FILE *stream, const char format[], ...); 42 void gm_fprintf(FILE *stream, const char format[], ...);
43 43
44 /**
45 * Assembles rootPath and relativePath into a single path, like this:
46 * rootPath/relativePath
47 *
48 * Uses SkPATH_SEPARATOR, to work on all platforms.
49 *
50 * TODO(epoger): This should probably move into SkOSFile.h
51 */
52 SkString SkPathJoin(const char *rootPath, const char *relativePath);
53
54 Json::Value ActualResultAsJsonValue(const SkHashDigest& result); 44 Json::Value ActualResultAsJsonValue(const SkHashDigest& result);
55 45
56 Json::Value CreateJsonTree(Json::Value expectedResults, 46 Json::Value CreateJsonTree(Json::Value expectedResults,
57 Json::Value actualResultsFailed, 47 Json::Value actualResultsFailed,
58 Json::Value actualResultsFailureIgnored, 48 Json::Value actualResultsFailureIgnored,
59 Json::Value actualResultsNoComparison, 49 Json::Value actualResultsNoComparison,
60 Json::Value actualResultsSucceeded); 50 Json::Value actualResultsSucceeded);
61 51
62 /** 52 /**
63 * Test expectations (allowed image checksums, etc.) 53 * Test expectations (allowed image checksums, etc.)
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 * Returns true if successful. 206 * Returns true if successful.
217 */ 207 */
218 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); 208 static bool Parse(const char *jsonPath, Json::Value *jsonRoot);
219 209
220 Json::Value fJsonRoot; 210 Json::Value fJsonRoot;
221 Json::Value fJsonExpectedResults; 211 Json::Value fJsonExpectedResults;
222 }; 212 };
223 213
224 } 214 }
225 #endif 215 #endif
OLDNEW
« no previous file with comments | « gm/factory.cpp ('k') | gm/gm_expectations.cpp » ('j') | gm/image.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698