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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 * don't have any expectations. | 126 * don't have any expectations. |
127 */ | 127 */ |
128 Expectations(Json::Value jsonElement); | 128 Expectations(Json::Value jsonElement); |
129 | 129 |
130 /** | 130 /** |
131 * Returns true iff we want to ignore failed expectations. | 131 * Returns true iff we want to ignore failed expectations. |
132 */ | 132 */ |
133 bool ignoreFailure() const { return this->fIgnoreFailure; } | 133 bool ignoreFailure() const { return this->fIgnoreFailure; } |
134 | 134 |
135 /** | 135 /** |
| 136 * Override default setting of fIgnoreFailure. |
| 137 */ |
| 138 void setIgnoreFailure(bool val) { this->fIgnoreFailure = val; } |
| 139 |
| 140 /** |
136 * Returns true iff there are no allowed results. | 141 * Returns true iff there are no allowed results. |
137 */ | 142 */ |
138 bool empty() const { return this->fAllowedResultDigests.empty(); } | 143 bool empty() const { return this->fAllowedResultDigests.empty(); } |
139 | 144 |
140 /** | 145 /** |
141 * Returns true iff resultDigest matches any allowed result, | 146 * Returns true iff resultDigest matches any allowed result, |
142 * regardless of fIgnoreFailure. (The caller can check | 147 * regardless of fIgnoreFailure. (The caller can check |
143 * that separately.) | 148 * that separately.) |
144 */ | 149 */ |
145 bool match(GmResultDigest resultDigest) const; | 150 bool match(GmResultDigest resultDigest) const; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 * Returns true if successful. | 269 * Returns true if successful. |
265 */ | 270 */ |
266 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); | 271 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); |
267 | 272 |
268 Json::Value fJsonRoot; | 273 Json::Value fJsonRoot; |
269 Json::Value fJsonExpectedResults; | 274 Json::Value fJsonExpectedResults; |
270 }; | 275 }; |
271 | 276 |
272 } | 277 } |
273 #endif | 278 #endif |
OLD | NEW |