| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 }); | 215 }); |
| 216 } | 216 } |
| 217 | 217 |
| 218 var testNum; | 218 var testNum; |
| 219 var failed; | 219 var failed; |
| 220 var errors; | 220 var errors; |
| 221 var passed; | 221 var passed; |
| 222 | 222 |
| 223 runParentTest() { | 223 runParentTest() { |
| 224 var tests = unittest.testCases; | 224 var tests = unittest.testCases; |
| 225 tests[testNum].startTime = new Date.now(); | 225 tests[testNum].startTime = new DateTime.now(); |
| 226 SendPort childPort = spawnFunction(runChildTest); | 226 SendPort childPort = spawnFunction(runChildTest); |
| 227 childPort.call(tests[testNum].description).then((results) { | 227 childPort.call(tests[testNum].description).then((results) { |
| 228 var result = results[0]; | 228 var result = results[0]; |
| 229 var duration = new Duration(milliseconds: results[1]); | 229 var duration = new Duration(milliseconds: results[1]); |
| 230 var message = results[2]; | 230 var message = results[2]; |
| 231 var stack = results[3]; | 231 var stack = results[3]; |
| 232 if (result == 'pass') { | 232 if (result == 'pass') { |
| 233 tests[testNum].pass(); | 233 tests[testNum].pass(); |
| 234 ++passed; | 234 ++passed; |
| 235 } else if (result == 'fail') { | 235 } else if (result == 'fail') { |
| (...skipping 40 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 |