OLD | NEW |
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 Loading... |
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 |
44 SkString make_filename(const char path[], | 54 SkString make_filename(const char path[], |
45 const char renderModeDescriptor[], | 55 const char renderModeDescriptor[], |
46 const char *name, | 56 const char *name, |
47 const char suffix[]); | 57 const char suffix[]); |
48 | 58 |
49 Json::Value ActualResultAsJsonValue(const SkHashDigest& result); | 59 Json::Value ActualResultAsJsonValue(const SkHashDigest& result); |
50 | 60 |
51 Json::Value CreateJsonTree(Json::Value expectedResults, | 61 Json::Value CreateJsonTree(Json::Value expectedResults, |
52 Json::Value actualResultsFailed, | 62 Json::Value actualResultsFailed, |
53 Json::Value actualResultsFailureIgnored, | 63 Json::Value actualResultsFailureIgnored, |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 * Returns true if successful. | 221 * Returns true if successful. |
212 */ | 222 */ |
213 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); | 223 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); |
214 | 224 |
215 Json::Value fJsonRoot; | 225 Json::Value fJsonRoot; |
216 Json::Value fJsonExpectedResults; | 226 Json::Value fJsonExpectedResults; |
217 }; | 227 }; |
218 | 228 |
219 } | 229 } |
220 #endif | 230 #endif |
OLD | NEW |