OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/config/gpu_test_expectations_parser.h" | 5 #include "gpu/config/gpu_test_expectations_parser.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 "entry invalid, likely wrong modifiers combination", | 122 "entry invalid, likely wrong modifiers combination", |
123 "entry with OS modifier conflicts", | 123 "entry with OS modifier conflicts", |
124 "entry with GPU vendor modifier conflicts", | 124 "entry with GPU vendor modifier conflicts", |
125 "entry with GPU build type conflicts", | 125 "entry with GPU build type conflicts", |
126 "entry with GPU device id conflicts or malformat", | 126 "entry with GPU device id conflicts or malformat", |
127 "entry with expectation modifier conflicts", | 127 "entry with expectation modifier conflicts", |
128 "two entries's configs overlap", | 128 "two entries's configs overlap", |
129 }; | 129 }; |
130 | 130 |
131 Token ParseToken(const std::string& word) { | 131 Token ParseToken(const std::string& word) { |
132 if (StartsWithASCII(word, "//", false)) | 132 if (base::StartsWithASCII(word, "//", false)) |
133 return kTokenComment; | 133 return kTokenComment; |
134 if (StartsWithASCII(word, "0x", false)) | 134 if (base::StartsWithASCII(word, "0x", false)) |
135 return kConfigGPUDeviceID; | 135 return kConfigGPUDeviceID; |
136 | 136 |
137 for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) { | 137 for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) { |
138 if (base::LowerCaseEqualsASCII(word, kTokenData[i].name)) | 138 if (base::LowerCaseEqualsASCII(word, kTokenData[i].name)) |
139 return static_cast<Token>(i); | 139 return static_cast<Token>(i); |
140 } | 140 } |
141 return kTokenWord; | 141 return kTokenWord; |
142 } | 142 } |
143 | 143 |
144 // reference name can have the last character as *. | 144 // reference name can have the last character as *. |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 message.c_str())); | 498 message.c_str())); |
499 } | 499 } |
500 | 500 |
501 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry() | 501 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry() |
502 : test_expectation(0), | 502 : test_expectation(0), |
503 line_number(0) { | 503 line_number(0) { |
504 } | 504 } |
505 | 505 |
506 } // namespace gpu | 506 } // namespace gpu |
507 | 507 |
OLD | NEW |