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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 * represent identical results. | 69 * represent identical results. |
70 */ | 70 */ |
71 bool equals(const GmResultDigest &other) const; | 71 bool equals(const GmResultDigest &other) const; |
72 | 72 |
73 /** | 73 /** |
74 * Returns a JSON type/value pair representing this result, | 74 * Returns a JSON type/value pair representing this result, |
75 * such as ["bitmap-64bitMD5", 12345]. | 75 * such as ["bitmap-64bitMD5", 12345]. |
76 */ | 76 */ |
77 Json::Value asJsonTypeValuePair() const; | 77 Json::Value asJsonTypeValuePair() const; |
78 | 78 |
| 79 /** |
| 80 * Returns the hashtype, such as "bitmap-64bitMD5", as an SkString. |
| 81 */ |
| 82 SkString getHashType() const; |
| 83 |
| 84 /** |
| 85 * Returns the hash digest value, such as "12345", as an SkString. |
| 86 */ |
| 87 SkString getDigestValue() const; |
| 88 |
79 private: | 89 private: |
80 bool fIsValid; // always check this first--if it's false, other fields a
re meaningless | 90 bool fIsValid; // always check this first--if it's false, other fields a
re meaningless |
81 uint64_t fHashDigest; | 91 uint64_t fHashDigest; |
82 }; | 92 }; |
83 | 93 |
84 /** | 94 /** |
85 * Test expectations (allowed image results, etc.) | 95 * Test expectations (allowed image results, etc.) |
86 */ | 96 */ |
87 class Expectations { | 97 class Expectations { |
88 public: | 98 public: |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 * Returns true if successful. | 248 * Returns true if successful. |
239 */ | 249 */ |
240 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); | 250 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); |
241 | 251 |
242 Json::Value fJsonRoot; | 252 Json::Value fJsonRoot; |
243 Json::Value fJsonExpectedResults; | 253 Json::Value fJsonExpectedResults; |
244 }; | 254 }; |
245 | 255 |
246 } | 256 } |
247 #endif | 257 #endif |
OLD | NEW |