| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** | 5 /** |
| 6 * Classes and methods for enumerating and preparing tests. | 6 * Classes and methods for enumerating and preparing tests. |
| 7 * | 7 * |
| 8 * This library includes: | 8 * This library includes: |
| 9 * | 9 * |
| 10 * - Creating tests by listing all the Dart files in certain directories, | 10 * - Creating tests by listing all the Dart files in certain directories, |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 expectCompileError(info)) { | 803 expectCompileError(info)) { |
| 804 // If a compile-time error is expected, and we're testing a | 804 // If a compile-time error is expected, and we're testing a |
| 805 // compiler, we never need to attempt to run the program (in a | 805 // compiler, we never need to attempt to run the program (in a |
| 806 // browser or otherwise). | 806 // browser or otherwise). |
| 807 enqueueStandardTest(info, testName, expectations); | 807 enqueueStandardTest(info, testName, expectations); |
| 808 } else if (configuration.runtime.isBrowser) { | 808 } else if (configuration.runtime.isBrowser) { |
| 809 Map<String, Set<Expectation>> expectationsMap; | 809 Map<String, Set<Expectation>> expectationsMap; |
| 810 | 810 |
| 811 if (info.optionsFromFile['isMultiHtmlTest'] as bool) { | 811 if (info.optionsFromFile['isMultiHtmlTest'] as bool) { |
| 812 // A browser multi-test has multiple expectations for one test file. | 812 // A browser multi-test has multiple expectations for one test file. |
| 813 // Find all the different sub-test expecations for one entire test file. | 813 // Find all the different sub-test expectations for one entire test |
| 814 // file. |
| 814 var subtestNames = info.optionsFromFile['subtestNames'] as List<String>; | 815 var subtestNames = info.optionsFromFile['subtestNames'] as List<String>; |
| 815 expectationsMap = <String, Set<Expectation>>{}; | 816 expectationsMap = <String, Set<Expectation>>{}; |
| 816 for (var name in subtestNames) { | 817 for (var name in subtestNames) { |
| 817 var fullTestName = '$testName/$name'; | 818 var fullTestName = '$testName/$name'; |
| 818 expectationsMap[fullTestName] = | 819 expectationsMap[fullTestName] = |
| 819 testExpectations.expectations(fullTestName); | 820 testExpectations.expectations(fullTestName); |
| 820 } | 821 } |
| 821 } else { | 822 } else { |
| 822 expectationsMap = {testName: expectations}; | 823 expectationsMap = {testName: expectations}; |
| 823 } | 824 } |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 | 1837 |
| 1837 bool isTestFile(String filename) { | 1838 bool isTestFile(String filename) { |
| 1838 // NOTE: We exclude tests and patch files for now. | 1839 // NOTE: We exclude tests and patch files for now. |
| 1839 return filename.endsWith(".dart") && | 1840 return filename.endsWith(".dart") && |
| 1840 !filename.endsWith("_test.dart") && | 1841 !filename.endsWith("_test.dart") && |
| 1841 !filename.contains("_internal/js_runtime/lib"); | 1842 !filename.contains("_internal/js_runtime/lib"); |
| 1842 } | 1843 } |
| 1843 | 1844 |
| 1844 bool get listRecursively => true; | 1845 bool get listRecursively => true; |
| 1845 } | 1846 } |
| OLD | NEW |