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 14 matching lines...) Expand all Loading... |
25 #include "json/reader.h" | 25 #include "json/reader.h" |
26 #include "json/value.h" | 26 #include "json/value.h" |
27 #ifdef SK_BUILD_FOR_WIN | 27 #ifdef SK_BUILD_FOR_WIN |
28 #pragma warning(pop) | 28 #pragma warning(pop) |
29 #endif | 29 #endif |
30 | 30 |
31 namespace skiagm { | 31 namespace skiagm { |
32 | 32 |
33 void gm_fprintf(FILE *stream, const char format[], ...); | 33 void gm_fprintf(FILE *stream, const char format[], ...); |
34 | 34 |
35 /** | |
36 * Assembles rootPath and relativePath into a single path, like this: | |
37 * rootPath/relativePath | |
38 * | |
39 * Uses SkPATH_SEPARATOR, to work on all platforms. | |
40 * | |
41 * TODO(epoger): This should probably move into SkOSFile.h | |
42 */ | |
43 SkString SkPathJoin(const char *rootPath, const char *relativePath); | |
44 | |
45 Json::Value CreateJsonTree(Json::Value expectedResults, | 35 Json::Value CreateJsonTree(Json::Value expectedResults, |
46 Json::Value actualResultsFailed, | 36 Json::Value actualResultsFailed, |
47 Json::Value actualResultsFailureIgnored, | 37 Json::Value actualResultsFailureIgnored, |
48 Json::Value actualResultsNoComparison, | 38 Json::Value actualResultsNoComparison, |
49 Json::Value actualResultsSucceeded); | 39 Json::Value actualResultsSucceeded); |
50 | 40 |
51 /** | 41 /** |
52 * The digest of a GM test result. | 42 * The digest of a GM test result. |
53 * | 43 * |
54 * Currently, this is always a uint64_t hash digest of an SkBitmap... | 44 * Currently, this is always a uint64_t hash digest of an SkBitmap... |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 * Returns true if successful. | 238 * Returns true if successful. |
249 */ | 239 */ |
250 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); | 240 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); |
251 | 241 |
252 Json::Value fJsonRoot; | 242 Json::Value fJsonRoot; |
253 Json::Value fJsonExpectedResults; | 243 Json::Value fJsonExpectedResults; |
254 }; | 244 }; |
255 | 245 |
256 } | 246 } |
257 #endif | 247 #endif |
OLD | NEW |