| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library("corelib_test_config"); | 5 #library("corelib_test_config"); |
| 6 | 6 |
| 7 #import("../../tools/testing/dart/test_runner.dart"); | 7 #import("../../tools/testing/dart/test_runner.dart"); |
| 8 #import("../../tools/testing/dart/status_file_parser.dart"); | 8 #import("../../tools/testing/dart/status_file_parser.dart"); |
| 9 | 9 |
| 10 class CorelibTestSuite { | 10 class CorelibTestSuite { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 throw s; | 39 throw s; |
| 40 }; | 40 }; |
| 41 dir.fileHandler = processFile; | 41 dir.fileHandler = processFile; |
| 42 dir.doneHandler = doDone; | 42 dir.doneHandler = doDone; |
| 43 dir.list(false); | 43 dir.list(false); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void processFile(String filename) { | 46 void processFile(String filename) { |
| 47 if (!filename.endsWith("Test.dart")) return; | 47 if (!filename.endsWith("Test.dart")) return; |
| 48 | 48 |
| 49 // If patterns are given only list the files that match one of the |
| 50 // patterns. |
| 51 var patterns = configuration['patterns']; |
| 52 if (!patterns.isEmpty() && |
| 53 !patterns.some((re) => re.hasMatch(filename))) { |
| 54 return; |
| 55 } |
| 56 |
| 49 int start = filename.lastIndexOf(pathSeparator); | 57 int start = filename.lastIndexOf(pathSeparator); |
| 50 String testName = filename.substring(start + 1, filename.length - 5); | 58 String testName = filename.substring(start + 1, filename.length - 5); |
| 51 Set<String> expectations = testExpectationsMap.expectations(testName); | 59 Set<String> expectations = testExpectationsMap.expectations(testName); |
| 52 | 60 |
| 53 // TODO(whesse): Skip files with internal directives, and multipart files, | 61 // TODO(whesse): Skip files with internal directives, and multipart files, |
| 54 // until they are handled correctly. | 62 // until they are handled correctly. |
| 55 if (expectations.contains(SKIP)) return; | 63 if (expectations.contains(SKIP)) return; |
| 56 | 64 |
| 57 List args = ["--ignore-unrecognized-flags"]; | 65 List args = ["--ignore-unrecognized-flags"]; |
| 58 if (configuration["checked"]) { | 66 if (configuration["checked"]) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 if (match != null) { | 105 if (match != null) { |
| 98 result.add(match[1].split(' ').filter((e) => e != '')); | 106 result.add(match[1].split(' ').filter((e) => e != '')); |
| 99 } | 107 } |
| 100 } | 108 } |
| 101 return result; | 109 return result; |
| 102 } | 110 } |
| 103 | 111 |
| 104 void completeHandler(TestCase testCase) { | 112 void completeHandler(TestCase testCase) { |
| 105 } | 113 } |
| 106 } | 114 } |
| OLD | NEW |