Chromium Code Reviews| 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 * A simple unit test library for running tests on the VM. | 6 * A simple unit test library for running tests on the VM. |
| 7 */ | 7 */ |
| 8 library unittest_vm_config; | 8 library unittest_vm_config; |
| 9 | 9 |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| 11 import 'unittest.dart'; | 11 import 'unittest.dart'; |
| 12 | 12 |
| 13 class VmConfiguration extends Configuration { | 13 class VMConfiguration extends Configuration { |
| 14 void onDone(int passed, int failed, int errors, List<TestCase> results, | 14 void onDone(bool success) { |
| 15 String uncaughtError) { | |
| 16 try { | 15 try { |
| 17 super.onDone(passed, failed, errors, results, uncaughtError); | 16 super.onDone(success); |
| 18 } on Exception catch (ex) { | 17 } catch (ex) { |
| 19 // A non-zero exit code is used by the test infrastructure to detect | 18 // A non-zero exit code is used by the test infrastructure to detect |
| 20 // failure. | 19 // failure. |
| 21 exit(1); | 20 exit(1); |
| 22 } | 21 } |
| 23 } | 22 } |
| 23 | |
| 24 void notifyController(String msg) {} | |
| 24 } | 25 } |
| 25 | 26 |
| 26 void useVmConfiguration() { | 27 void useVMConfiguration() { |
|
Jennifer Messerly
2013/01/10 03:01:18
totally optional but: is it worth having an @depre
| |
| 27 configure(new VmConfiguration()); | 28 configure(new VMConfiguration()); |
| 28 } | 29 } |
| OLD | NEW |