1 //
2 // Copyright 2019 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // GPUTestExpectationsParser_unittest.cpp: Unit tests for GPUTestExpectationsParser*
7 //
8
9 #include "tests/test_expectations/GPUTestExpectationsParser.h"
10 #include <gtest/gtest.h>
11 #include "tests/test_expectations/GPUTestConfig.h"
12
13 using namespace angle;
14
15 namespace
16 {
17
18 class GPUTestConfigTester : public GPUTestConfig
19 {
20 public:
GPUTestConfigTester()21 GPUTestConfigTester()
22 {
23 mConditions.reset();
24 mConditions[GPUTestConfig::kConditionWin] = true;
25 mConditions[GPUTestConfig::kConditionNVIDIA] = true;
26 mConditions[GPUTestConfig::kConditionD3D11] = true;
27 }
28 };
29
30 // A correct entry with a test that's skipped on all platforms should not lead
31 // to any errors, and should properly return the expectation SKIP.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserSkip)32 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserSkip)
33 {
34 GPUTestConfigTester config;
35 std::string line =
36 R"(100 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
37 GPUTestExpectationsParser parser;
38 EXPECT_TRUE(parser.loadTestExpectations(config, line));
39 EXPECT_TRUE(parser.getErrorMessages().empty());
40 EXPECT_EQ(
41 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
42 GPUTestExpectationsParser::kGpuTestSkip);
43 }
44
45 // A correct entry with a test that's failed on all platforms should not lead
46 // to any errors, and should properly return the expectation FAIL.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserFail)47 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserFail)
48 {
49 GPUTestConfigTester config;
50 std::string line =
51 R"(100 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = FAIL)";
52 GPUTestExpectationsParser parser;
53 EXPECT_TRUE(parser.loadTestExpectations(config, line));
54 EXPECT_TRUE(parser.getErrorMessages().empty());
55 EXPECT_EQ(
56 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
57 GPUTestExpectationsParser::kGpuTestFail);
58 }
59
60 // A correct entry with a test that's passed on all platforms should not lead
61 // to any errors, and should properly return the expectation PASS.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserPass)62 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserPass)
63 {
64 GPUTestConfigTester config;
65 std::string line =
66 R"(100 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = PASS)";
67 GPUTestExpectationsParser parser;
68 EXPECT_TRUE(parser.loadTestExpectations(config, line));
69 EXPECT_TRUE(parser.getErrorMessages().empty());
70 EXPECT_EQ(
71 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
72 GPUTestExpectationsParser::kGpuTestPass);
73 }
74
75 // A correct entry with a test that's timed out on all platforms should not lead
76 // to any errors, and should properly return the expectation TIMEOUT.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserTimeout)77 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserTimeout)
78 {
79 GPUTestConfigTester config;
80 std::string line =
81 R"(100 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = TIMEOUT)";
82 GPUTestExpectationsParser parser;
83 EXPECT_TRUE(parser.loadTestExpectations(config, line));
84 EXPECT_TRUE(parser.getErrorMessages().empty());
85 EXPECT_EQ(
86 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
87 GPUTestExpectationsParser::kGpuTestTimeout);
88 }
89
90 // A correct entry with a test that's flaky on all platforms should not lead
91 // to any errors, and should properly return the expectation FLAKY.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserFlaky)92 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserFlaky)
93 {
94 GPUTestConfigTester config;
95 std::string line =
96 R"(100 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = FLAKY)";
97 GPUTestExpectationsParser parser;
98 EXPECT_TRUE(parser.loadTestExpectations(config, line));
99 EXPECT_TRUE(parser.getErrorMessages().empty());
100 EXPECT_EQ(
101 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
102 GPUTestExpectationsParser::kGpuTestFlaky);
103 }
104
105 // A correct entry with a test that's skipped on windows should not lead
106 // to any errors, and should properly return the expectation SKIP on this
107 // tester.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserSingleLineWin)108 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserSingleLineWin)
109 {
110 GPUTestConfigTester config;
111 std::string line =
112 R"(100 WIN : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
113 GPUTestExpectationsParser parser;
114 EXPECT_TRUE(parser.loadTestExpectations(config, line));
115 EXPECT_TRUE(parser.getErrorMessages().empty());
116 EXPECT_EQ(
117 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
118 GPUTestExpectationsParser::kGpuTestSkip);
119 }
120
121 // A correct entry with a test that's skipped on windows/NVIDIA should not lead
122 // to any errors, and should properly return the expectation SKIP on this
123 // tester.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserSingleLineWinNVIDIA)124 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserSingleLineWinNVIDIA)
125 {
126 GPUTestConfigTester config;
127 std::string line =
128 R"(100 WIN NVIDIA : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
129 GPUTestExpectationsParser parser;
130 EXPECT_TRUE(parser.loadTestExpectations(config, line));
131 EXPECT_TRUE(parser.getErrorMessages().empty());
132 EXPECT_EQ(
133 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
134 GPUTestExpectationsParser::kGpuTestSkip);
135 }
136
137 // A correct entry with a test that's skipped on windows/NVIDIA/D3D11 should not
138 // lead to any errors, and should properly return the expectation SKIP on this
139 // tester.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserSingleLineWinNVIDIAD3D11)140 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserSingleLineWinNVIDIAD3D11)
141 {
142 GPUTestConfigTester config;
143 std::string line =
144 R"(100 WIN NVIDIA D3D11 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
145 GPUTestExpectationsParser parser;
146 EXPECT_TRUE(parser.loadTestExpectations(config, line));
147 EXPECT_TRUE(parser.getErrorMessages().empty());
148 EXPECT_EQ(
149 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
150 GPUTestExpectationsParser::kGpuTestSkip);
151 }
152
153 // Same as GPUTestExpectationsParserSingleLineWinNVIDIAD3D11, but verifying that the order
154 // of these conditions doesn't matter
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserSingleLineWinNVIDIAD3D11OtherOrder)155 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserSingleLineWinNVIDIAD3D11OtherOrder)
156 {
157 GPUTestConfigTester config;
158 std::string line =
159 R"(100 D3D11 NVIDIA WIN : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
160 GPUTestExpectationsParser parser;
161 EXPECT_TRUE(parser.loadTestExpectations(config, line));
162 EXPECT_TRUE(parser.getErrorMessages().empty());
163 EXPECT_EQ(
164 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
165 GPUTestExpectationsParser::kGpuTestSkip);
166 }
167
168 // A correct entry with a test that's skipped on mac should not lead
169 // to any errors, and should default to PASS on this tester (windows).
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserSingleLineMac)170 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserSingleLineMac)
171 {
172 GPUTestConfigTester config;
173 std::string line =
174 R"(100 MAC : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
175 GPUTestExpectationsParser parser;
176 EXPECT_TRUE(parser.loadTestExpectations(config, line));
177 EXPECT_TRUE(parser.getErrorMessages().empty());
178 EXPECT_EQ(
179 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
180 GPUTestExpectationsParser::kGpuTestPass);
181 }
182
183 // A correct entry with a test that has conflicting entries should not lead
184 // to any errors, and should default to PASS.
185 // (https:anglebug.com/3368) In the future, this condition should cause an
186 // error
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserSingleLineConflict)187 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserSingleLineConflict)
188 {
189 GPUTestConfigTester config;
190 std::string line =
191 R"(100 WIN MAC : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
192 GPUTestExpectationsParser parser;
193 EXPECT_TRUE(parser.loadTestExpectations(config, line));
194 EXPECT_TRUE(parser.getErrorMessages().empty());
195 EXPECT_EQ(
196 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
197 GPUTestExpectationsParser::kGpuTestPass);
198 }
199
200 // A line without a bug ID should return an error and not add the expectation.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserMissingBugId)201 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserMissingBugId)
202 {
203 GPUTestConfigTester config;
204 std::string line = R"( : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
205 GPUTestExpectationsParser parser;
206 EXPECT_FALSE(parser.loadTestExpectations(config, line));
207 EXPECT_EQ(parser.getErrorMessages().size(), 1u);
208 if (parser.getErrorMessages().size() >= 1)
209 {
210 EXPECT_EQ(parser.getErrorMessages()[0], "Line 1 : entry with wrong format");
211 }
212 // Default behavior is to let missing tests pass
213 EXPECT_EQ(
214 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
215 GPUTestExpectationsParser::kGpuTestPass);
216 }
217
218 // A line without a bug ID should return an error and not add the expectation, (even if
219 // the line contains conditions that might be mistaken for a bug id)
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserMissingBugIdWithConditions)220 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserMissingBugIdWithConditions)
221 {
222 GPUTestConfigTester config;
223 std::string line =
224 R"(WIN D3D11 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
225 GPUTestExpectationsParser parser;
226 EXPECT_FALSE(parser.loadTestExpectations(config, line));
227 EXPECT_EQ(parser.getErrorMessages().size(), 1u);
228 if (parser.getErrorMessages().size() >= 1)
229 {
230 EXPECT_EQ(parser.getErrorMessages()[0], "Line 1 : entry with wrong format");
231 }
232 // Default behavior is to let missing tests pass
233 EXPECT_EQ(
234 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
235 GPUTestExpectationsParser::kGpuTestPass);
236 }
237
238 // A line without a colon should return an error and not add the expectation.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserMissingColon)239 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserMissingColon)
240 {
241 GPUTestConfigTester config;
242 std::string line = R"(100 dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
243 GPUTestExpectationsParser parser;
244 EXPECT_FALSE(parser.loadTestExpectations(config, line));
245 EXPECT_EQ(parser.getErrorMessages().size(), 1u);
246 if (parser.getErrorMessages().size() >= 1)
247 {
248 EXPECT_EQ(parser.getErrorMessages()[0], "Line 1 : entry with wrong format");
249 }
250 // Default behavior is to let missing tests pass
251 EXPECT_EQ(
252 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
253 GPUTestExpectationsParser::kGpuTestPass);
254 }
255
256 // A wild character (*) at the end of a line should match any expectations that are a subset of that
257 // line. It should not greedily match to omany expectations that aren't in that subset.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserWildChar)258 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserWildChar)
259 {
260 GPUTestConfigTester config;
261 std::string line = R"(100 : dEQP-GLES31.functional.layout_binding.ubo.* = SKIP)";
262 GPUTestExpectationsParser parser;
263 EXPECT_TRUE(parser.loadTestExpectations(config, line));
264 EXPECT_TRUE(parser.getErrorMessages().empty());
265 EXPECT_EQ(
266 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
267 GPUTestExpectationsParser::kGpuTestSkip);
268 // Also ensure the wild char is not too wild, only covers tests that are more specific
269 EXPECT_EQ(parser.getTestExpectation(
270 "dEQP-GLES31.functional.program_interface_query.transform_feedback_varying."
271 "resource_list.vertex_fragment.builtin_gl_position"),
272 GPUTestExpectationsParser::kGpuTestPass);
273 }
274
275 // A line without an equals should return an error and not add the expectation.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserMissingEquals)276 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserMissingEquals)
277 {
278 GPUTestConfigTester config;
279 std::string line = R"(100 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max SKIP)";
280 GPUTestExpectationsParser parser;
281 EXPECT_FALSE(parser.loadTestExpectations(config, line));
282 EXPECT_EQ(parser.getErrorMessages().size(), 1u);
283 if (parser.getErrorMessages().size() >= 1)
284 {
285 EXPECT_EQ(parser.getErrorMessages()[0], "Line 1 : entry with wrong format");
286 }
287 // Default behavior is to let missing tests pass
288 EXPECT_EQ(
289 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
290 GPUTestExpectationsParser::kGpuTestPass);
291 }
292
293 // A line without an expectation should return an error and not add the expectation.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserMissingExpectation)294 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserMissingExpectation)
295 {
296 GPUTestConfigTester config;
297 std::string line = R"(100 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max =)";
298 GPUTestExpectationsParser parser;
299 EXPECT_FALSE(parser.loadTestExpectations(config, line));
300 EXPECT_EQ(parser.getErrorMessages().size(), 1u);
301 if (parser.getErrorMessages().size() >= 1)
302 {
303 EXPECT_EQ(parser.getErrorMessages()[0], "Line 1 : entry with wrong format");
304 }
305 // Default behavior is to let missing tests pass
306 EXPECT_EQ(
307 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
308 GPUTestExpectationsParser::kGpuTestPass);
309 }
310
311 // A line with an expectation that doesn't exist should return an error and not add the expectation.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserInvalidExpectation)312 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserInvalidExpectation)
313 {
314 GPUTestConfigTester config;
315 std::string line =
316 R"(100 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = WRONG)";
317 GPUTestExpectationsParser parser;
318 EXPECT_FALSE(parser.loadTestExpectations(config, line));
319 EXPECT_EQ(parser.getErrorMessages().size(), 1u);
320 if (parser.getErrorMessages().size() >= 1)
321 {
322 EXPECT_EQ(parser.getErrorMessages()[0], "Line 1 : entry with wrong format");
323 }
324 // Default behavior is to let missing tests pass
325 EXPECT_EQ(
326 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
327 GPUTestExpectationsParser::kGpuTestPass);
328 }
329
330 // ChromeOS is reserved as a token, but doesn't actually check any conditions. Any tokens that
331 // do not check conditions should return an error and not add the expectation
332 // (https://anglebug.com/3363) Remove/update this test when ChromeOS is supported
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserUnimplementedCondition)333 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserUnimplementedCondition)
334 {
335 GPUTestConfigTester config;
336 std::string line =
337 R"(100 CHROMEOS : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
338 GPUTestExpectationsParser parser;
339 EXPECT_FALSE(parser.loadTestExpectations(config, line));
340 EXPECT_EQ(parser.getErrorMessages().size(), 1u);
341 if (parser.getErrorMessages().size() >= 1)
342 {
343 EXPECT_EQ(parser.getErrorMessages()[0],
344 "Line 1 : entry invalid, likely unimplemented modifiers");
345 }
346 // Default behavior is to let missing tests pass
347 EXPECT_EQ(
348 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
349 GPUTestExpectationsParser::kGpuTestPass);
350 }
351
352 // If a line starts with a comment, it's ignored and should not be added to the list.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserComment)353 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserComment)
354 {
355 GPUTestConfigTester config;
356 std::string line =
357 R"(//100 : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = SKIP)";
358 GPUTestExpectationsParser parser;
359 EXPECT_TRUE(parser.loadTestExpectations(config, line));
360 EXPECT_TRUE(parser.getErrorMessages().empty());
361 EXPECT_EQ(
362 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
363 GPUTestExpectationsParser::kGpuTestPass);
364 }
365
366 // A misspelled expectation should not be matched from getTestExpectation, and should lead to an
367 // unused expectation when later queried.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserMisspelledExpectation)368 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserMisspelledExpectation)
369 {
370 GPUTestConfigTester config;
371 std::string line =
372 R"(100 : dEQP-GLES31.functionaal.layout_binding.ubo.* = SKIP)"; // "functionaal"
373 GPUTestExpectationsParser parser;
374 EXPECT_TRUE(parser.loadTestExpectations(config, line));
375 EXPECT_TRUE(parser.getErrorMessages().empty());
376 // Default behavior is to let missing tests pass
377 EXPECT_EQ(
378 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
379 GPUTestExpectationsParser::kGpuTestPass);
380 EXPECT_EQ(parser.getUnusedExpectationsMessages().size(), 1u);
381 if (parser.getUnusedExpectationsMessages().size() >= 1)
382 {
383 EXPECT_EQ(parser.getUnusedExpectationsMessages()[0], "Line 1: expectation was unused.");
384 }
385 }
386
387 // Wild characters that match groups of expectations can be overridden with more specific lines.
388 // The parse should still compute correctly which lines were used and which were unused.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserOverrideExpectation)389 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserOverrideExpectation)
390 {
391 GPUTestConfigTester config;
392 // Fail all layout_binding tests, but skip the layout_binding.ubo subset.
393 std::string line = R"(100 : dEQP-GLES31.functional.layout_binding.* = FAIL
394 100 : dEQP-GLES31.functional.layout_binding.ubo.* = SKIP)";
395 GPUTestExpectationsParser parser;
396 EXPECT_TRUE(parser.loadTestExpectations(config, line));
397 EXPECT_TRUE(parser.getErrorMessages().empty());
398 // Default behavior is to let missing tests pass
399 EXPECT_EQ(
400 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
401 GPUTestExpectationsParser::kGpuTestSkip);
402 // The FAIL expectation was unused because it was overridden.
403 EXPECT_EQ(parser.getUnusedExpectationsMessages().size(), 1u);
404 if (parser.getUnusedExpectationsMessages().size() >= 1)
405 {
406 EXPECT_EQ(parser.getUnusedExpectationsMessages()[0], "Line 1: expectation was unused.");
407 }
408 // Now try a test that doesn't match the override criteria
409 EXPECT_EQ(parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.image.test"),
410 GPUTestExpectationsParser::kGpuTestFail);
411 EXPECT_TRUE(parser.getUnusedExpectationsMessages().empty());
412 }
413
414 // This test is the same as GPUTestExpectationsParserOverrideExpectation, but verifying the order
415 // doesn't matter when overriding.
TEST(GPUTestExpectationsParserTest,GPUTestExpectationsParserOverrideExpectationOtherOrder)416 TEST(GPUTestExpectationsParserTest, GPUTestExpectationsParserOverrideExpectationOtherOrder)
417 {
418 GPUTestConfigTester config;
419 // Fail all layout_binding tests, but skip the layout_binding.ubo subset.
420 std::string line = R"(100 : dEQP-GLES31.functional.layout_binding.ubo.* = SKIP
421 100 : dEQP-GLES31.functional.layout_binding.* = FAIL)";
422 GPUTestExpectationsParser parser;
423 EXPECT_TRUE(parser.loadTestExpectations(config, line));
424 EXPECT_TRUE(parser.getErrorMessages().empty());
425 // Default behavior is to let missing tests pass
426 EXPECT_EQ(
427 parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max"),
428 GPUTestExpectationsParser::kGpuTestSkip);
429 // The FAIL expectation was unused because it was overridden.
430 EXPECT_EQ(parser.getUnusedExpectationsMessages().size(), 1u);
431 if (parser.getUnusedExpectationsMessages().size() >= 1)
432 {
433 EXPECT_EQ(parser.getUnusedExpectationsMessages()[0], "Line 2: expectation was unused.");
434 }
435 // Now try a test that doesn't match the override criteria
436 EXPECT_EQ(parser.getTestExpectation("dEQP-GLES31.functional.layout_binding.image.test"),
437 GPUTestExpectationsParser::kGpuTestFail);
438 EXPECT_TRUE(parser.getUnusedExpectationsMessages().empty());
439 }
440
441 } // anonymous namespace
442