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 | 7 |
8 #include "gm_expectations.h" | 8 #include "gm_expectations.h" |
9 #include "SkBitmapHasher.h" | 9 #include "SkBitmapHasher.h" |
10 #include "SkImageDecoder.h" | 10 #include "SkImageDecoder.h" |
11 | 11 |
12 #define DEBUGFAIL_SEE_STDERR SkDEBUGFAIL("see stderr for message") | 12 #define DEBUGFAIL_SEE_STDERR SkDEBUGFAIL("see stderr for message") |
13 | 13 |
14 // These constants must be kept in sync with the JSONKEY_ constants in | 14 // See gm_json.py for descriptions of each of these JSON keys. |
15 // gm_json.py ! | 15 // These constants must be kept in sync with the ones in that Python file! |
16 const static char kJsonKey_ActualResults[] = "actual-results"; | 16 const static char kJsonKey_ActualResults[] = "actual-results"; |
17 const static char kJsonKey_ActualResults_Failed[] = "failed"; | 17 const static char kJsonKey_ActualResults_Failed[] = "failed"; |
18 const static char kJsonKey_ActualResults_FailureIgnored[]= "failure-ignored"; | 18 const static char kJsonKey_ActualResults_FailureIgnored[]= "failure-ignored"; |
19 const static char kJsonKey_ActualResults_NoComparison[] = "no-comparison"; | 19 const static char kJsonKey_ActualResults_NoComparison[] = "no-comparison"; |
20 const static char kJsonKey_ActualResults_Succeeded[] = "succeeded"; | 20 const static char kJsonKey_ActualResults_Succeeded[] = "succeeded"; |
21 | |
22 const static char kJsonKey_ExpectedResults[] = "expected-results"; | 21 const static char kJsonKey_ExpectedResults[] = "expected-results"; |
23 const static char kJsonKey_ExpectedResults_AllowedDigests[] = "allowed-digests"; | 22 const static char kJsonKey_ExpectedResults_AllowedDigests[] = "allowed-digests"; |
24 const static char kJsonKey_ExpectedResults_IgnoreFailure[] = "ignore-failure"; | 23 const static char kJsonKey_ExpectedResults_IgnoreFailure[] = "ignore-failure"; |
25 | 24 |
26 // Types of result hashes we support in the JSON file. | 25 // Types of result hashes we support in the JSON file. |
27 const static char kJsonKey_Hashtype_Bitmap_64bitMD5[] = "bitmap-64bitMD5"; | 26 const static char kJsonKey_Hashtype_Bitmap_64bitMD5[] = "bitmap-64bitMD5"; |
28 | 27 |
29 | 28 |
30 namespace skiagm { | 29 namespace skiagm { |
31 | 30 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 Json::Reader reader; | 262 Json::Reader reader; |
264 if (!reader.parse(bytes, bytes+size, *jsonRoot)) { | 263 if (!reader.parse(bytes, bytes+size, *jsonRoot)) { |
265 gm_fprintf(stderr, "error parsing JSON file %s\n", jsonPath); | 264 gm_fprintf(stderr, "error parsing JSON file %s\n", jsonPath); |
266 DEBUGFAIL_SEE_STDERR; | 265 DEBUGFAIL_SEE_STDERR; |
267 return false; | 266 return false; |
268 } | 267 } |
269 return true; | 268 return true; |
270 } | 269 } |
271 | 270 |
272 } | 271 } |
OLD | NEW |