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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 "two entries's configs overlap", | 130 "two entries's configs overlap", |
131 }; | 131 }; |
132 | 132 |
133 Token ParseToken(const std::string& word) { | 133 Token ParseToken(const std::string& word) { |
134 if (StartsWithASCII(word, "//", false)) | 134 if (StartsWithASCII(word, "//", false)) |
135 return kTokenComment; | 135 return kTokenComment; |
136 if (StartsWithASCII(word, "0x", false)) | 136 if (StartsWithASCII(word, "0x", false)) |
137 return kConfigGPUDeviceID; | 137 return kConfigGPUDeviceID; |
138 | 138 |
139 for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) { | 139 for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) { |
140 if (LowerCaseEqualsASCII(word, kTokenData[i].name)) | 140 if (base::LowerCaseEqualsASCII(word, kTokenData[i].name)) |
141 return static_cast<Token>(i); | 141 return static_cast<Token>(i); |
142 } | 142 } |
143 return kTokenWord; | 143 return kTokenWord; |
144 } | 144 } |
145 | 145 |
146 // reference name can have the last character as *. | 146 // reference name can have the last character as *. |
147 bool NamesMatching(const std::string& ref, const std::string& test_name) { | 147 bool NamesMatching(const std::string& ref, const std::string& test_name) { |
148 size_t len = ref.length(); | 148 size_t len = ref.length(); |
149 if (len == 0) | 149 if (len == 0) |
150 return false; | 150 return false; |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 message.c_str())); | 503 message.c_str())); |
504 } | 504 } |
505 | 505 |
506 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry() | 506 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry() |
507 : test_expectation(0), | 507 : test_expectation(0), |
508 line_number(0) { | 508 line_number(0) { |
509 } | 509 } |
510 | 510 |
511 } // namespace gpu | 511 } // namespace gpu |
512 | 512 |
OLD | NEW |