| 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'); | 8 #library('unittest'); |
| 9 | 9 |
| 10 #import('dart:io'); | 10 #import('dart:io'); |
| 11 #import('dart:isolate'); | 11 #import('unittest.dart'); |
| 12 | 12 |
| 13 #source('config.dart'); | 13 class VmConfiguration extends Configuration { |
| 14 #source('shared.dart'); | |
| 15 | |
| 16 class PlatformConfiguration extends Configuration { | |
| 17 void onDone(int passed, int failed, int errors, List<TestCase> results) { | 14 void onDone(int passed, int failed, int errors, List<TestCase> results) { |
| 18 try { | 15 try { |
| 19 super.onDone(passed, failed, errors, results); | 16 super.onDone(passed, failed, errors, results); |
| 20 } catch (Exception ex) { | 17 } catch (Exception ex) { |
| 21 // 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 |
| 22 // failure. | 19 // failure. |
| 23 exit(1); | 20 exit(1); |
| 24 } | 21 } |
| 25 } | 22 } |
| 26 } | 23 } |
| 24 |
| 25 void useVmConfiguration() { |
| 26 configure(new VmConfiguration()); |
| 27 } |
| OLD | NEW |