| 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 // These constants must be kept in sync with the JSONKEY_ constants in |
| 15 // display_json_results.py ! | 15 // gm_json.py ! |
| 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 | 21 |
| 22 const static char kJsonKey_ExpectedResults[] = "expected-results"; | 22 const static char kJsonKey_ExpectedResults[] = "expected-results"; |
| 23 const static char kJsonKey_ExpectedResults_AllowedDigests[] = "allowed-digests"; | 23 const static char kJsonKey_ExpectedResults_AllowedDigests[] = "allowed-digests"; |
| 24 const static char kJsonKey_ExpectedResults_IgnoreFailure[] = "ignore-failure"; | 24 const static char kJsonKey_ExpectedResults_IgnoreFailure[] = "ignore-failure"; |
| 25 | 25 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 Json::Reader reader; | 258 Json::Reader reader; |
| 259 if (!reader.parse(bytes, bytes+size, *jsonRoot)) { | 259 if (!reader.parse(bytes, bytes+size, *jsonRoot)) { |
| 260 gm_fprintf(stderr, "error parsing JSON file %s\n", jsonPath); | 260 gm_fprintf(stderr, "error parsing JSON file %s\n", jsonPath); |
| 261 DEBUGFAIL_SEE_STDERR; | 261 DEBUGFAIL_SEE_STDERR; |
| 262 return false; | 262 return false; |
| 263 } | 263 } |
| 264 return true; | 264 return true; |
| 265 } | 265 } |
| 266 | 266 |
| 267 } | 267 } |
| OLD | NEW |