| 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 // TODO(gram): dart2js is not handling 'part of' properly yet; when it does | 5 // TODO(gram): dart2js is not handling 'part of' properly yet; when it does |
| 6 // uncomment this. | 6 // uncomment this. |
| 7 //part of test_controller; | 7 //part of test_controller; |
| 8 | 8 |
| 9 /** Path to DRT executable. */ | 9 /** Path to DRT executable. */ |
| 10 String drt; | 10 String drt; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 for (var t in tests) { | 153 for (var t in tests) { |
| 154 var groupName, testName = ''; | 154 var groupName, testName = ''; |
| 155 var idx = t.description.lastIndexOf('###'); | 155 var idx = t.description.lastIndexOf('###'); |
| 156 if (idx >= 0) { | 156 if (idx >= 0) { |
| 157 groupName = t.description.substring(0, idx).replaceAll('###', ' '); | 157 groupName = t.description.substring(0, idx).replaceAll('###', ' '); |
| 158 if (!groups.containsKey(groupName)) { | 158 if (!groups.containsKey(groupName)) { |
| 159 groups[groupName] = ''; | 159 groups[groupName] = ''; |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 for (var g in groups.getKeys()) { | 163 for (var g in groups.keys) { |
| 164 var msg = formatListMessage('$testfile ', '$g '); | 164 var msg = formatListMessage('$testfile ', '$g '); |
| 165 print('###$msg'); | 165 print('###$msg'); |
| 166 } | 166 } |
| 167 if (notifyDone != null) { | 167 if (notifyDone != null) { |
| 168 notifyDone(0); | 168 notifyDone(0); |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 listTests() { | 172 listTests() { |
| 173 List tests = unittest.testCases; | 173 List tests = unittest.testCases; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 } | 276 } |
| 277 | 277 |
| 278 process(testMain, action) { | 278 process(testMain, action) { |
| 279 unittest.groupSep = '###'; | 279 unittest.groupSep = '###'; |
| 280 unittest.configure(new TestRunnerConfiguration()); | 280 unittest.configure(new TestRunnerConfiguration()); |
| 281 unittest.group('', testMain); | 281 unittest.group('', testMain); |
| 282 // Do any user-specified test filtering. | 282 // Do any user-specified test filtering. |
| 283 unittest.filterTests(filterTest); | 283 unittest.filterTests(filterTest); |
| 284 action(); | 284 action(); |
| 285 } | 285 } |
| OLD | NEW |