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 |
| 15 // confirm_no_failures_in_json.py ! |
14 const static char kJsonKey_ActualResults[] = "actual-results"; | 16 const static char kJsonKey_ActualResults[] = "actual-results"; |
15 const static char kJsonKey_ActualResults_Failed[] = "failed"; | 17 const static char kJsonKey_ActualResults_Failed[] = "failed"; |
16 const static char kJsonKey_ActualResults_FailureIgnored[]= "failure-ignored"; | 18 const static char kJsonKey_ActualResults_FailureIgnored[]= "failure-ignored"; |
17 const static char kJsonKey_ActualResults_NoComparison[] = "no-comparison"; | 19 const static char kJsonKey_ActualResults_NoComparison[] = "no-comparison"; |
18 const static char kJsonKey_ActualResults_Succeeded[] = "succeeded"; | 20 const static char kJsonKey_ActualResults_Succeeded[] = "succeeded"; |
19 const static char kJsonKey_ActualResults_AnyStatus_BitmapHash[] = "bitmap-64bit
MD5"; | 21 const static char kJsonKey_ActualResults_AnyStatus_BitmapHash[] = "bitmap-64bit
MD5"; |
20 | 22 |
21 const static char kJsonKey_ExpectedResults[] = "expected-results"; | 23 const static char kJsonKey_ExpectedResults[] = "expected-results"; |
22 const static char kJsonKey_ExpectedResults_AllowedBitmapHashes[] = "allowed-bitm
ap-64bitMD5s"; | 24 const static char kJsonKey_ExpectedResults_AllowedBitmapHashes[] = "allowed-bitm
ap-64bitMD5s"; |
23 const static char kJsonKey_ExpectedResults_IgnoreFailure[] = "ignore-f
ailure"; | 25 const static char kJsonKey_ExpectedResults_IgnoreFailure[] = "ignore-f
ailure"; |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 Json::Reader reader; | 229 Json::Reader reader; |
228 if (!reader.parse(bytes, bytes+size, *jsonRoot)) { | 230 if (!reader.parse(bytes, bytes+size, *jsonRoot)) { |
229 gm_fprintf(stderr, "error parsing JSON file %s\n", jsonPath); | 231 gm_fprintf(stderr, "error parsing JSON file %s\n", jsonPath); |
230 DEBUGFAIL_SEE_STDERR; | 232 DEBUGFAIL_SEE_STDERR; |
231 return false; | 233 return false; |
232 } | 234 } |
233 return true; | 235 return true; |
234 } | 236 } |
235 | 237 |
236 } | 238 } |
OLD | NEW |