| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 } | 72 } |
| 73 file_path = file_path.RemoveExtension(); | 73 file_path = file_path.RemoveExtension(); |
| 74 tests.insert(file_path.value()); | 74 tests.insert(file_path.value()); |
| 75 } | 75 } |
| 76 std::vector<std::string> result; | 76 std::vector<std::string> result; |
| 77 for (auto it = tests.begin(); it != tests.end(); it++) { | 77 for (auto it = tests.begin(); it != tests.end(); it++) { |
| 78 const std::string& test_name = *it; | 78 const std::string& test_name = *it; |
| 79 std::string source; | 79 std::string source; |
| 80 bool r; | 80 bool r; |
| 81 std::string filename = base::FilePath(test_name).BaseName().value(); | 81 std::string filename = base::FilePath(test_name).BaseName().value(); |
| 82 if (!StartsWithASCII(filename, "conformance_", true)) { | 82 if (!base::StartsWith(filename, "conformance_", |
| 83 base::CompareCase::SENSITIVE)) { |
| 83 // Only include conformance tests. | 84 // Only include conformance tests. |
| 84 continue; | 85 continue; |
| 85 } | 86 } |
| 86 base::FilePath data_path(test_name); | 87 base::FilePath data_path(test_name); |
| 87 data_path = data_path.AddExtension(".data"); | 88 data_path = data_path.AddExtension(".data"); |
| 88 base::FilePath expected_path(test_name); | 89 base::FilePath expected_path(test_name); |
| 89 expected_path = expected_path.AddExtension(".expected"); | 90 expected_path = expected_path.AddExtension(".expected"); |
| 90 // Test name. | 91 // Test name. |
| 91 result.push_back(test_name.c_str()); | 92 result.push_back(test_name.c_str()); |
| 92 // Test's .data. | 93 // Test's .data. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 104 } | 105 } |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 TEST_F(DartValidationTest, validation) { | 108 TEST_F(DartValidationTest, validation) { |
| 108 RunTest(GetPath()); | 109 RunTest(GetPath()); |
| 109 } | 110 } |
| 110 | 111 |
| 111 } // namespace | 112 } // namespace |
| 112 } // namespace dart | 113 } // namespace dart |
| 113 } // namespace mojo | 114 } // namespace mojo |
| OLD | NEW |