| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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:async'; | 10 import 'dart:async'; |
| 11 import 'dart:io'; | 11 import 'dart:io'; |
| 12 import 'unittest.dart'; | 12 import 'unittest.dart'; |
| 13 | 13 |
| 14 class VMConfiguration extends Configuration { | 14 class VMConfiguration extends SimpleConfiguration { |
| 15 // Color constants used for generating messages. | 15 // Color constants used for generating messages. |
| 16 final String GREEN_COLOR = '\u001b[32m'; | 16 final String GREEN_COLOR = '\u001b[32m'; |
| 17 final String RED_COLOR = '\u001b[31m'; | 17 final String RED_COLOR = '\u001b[31m'; |
| 18 final String MAGENTA_COLOR = '\u001b[35m'; | 18 final String MAGENTA_COLOR = '\u001b[35m'; |
| 19 final String NO_COLOR = '\u001b[0m'; | 19 final String NO_COLOR = '\u001b[0m'; |
| 20 | 20 |
| 21 // We make this public so the user can turn it off if they want. | 21 // We make this public so the user can turn it off if they want. |
| 22 bool useColor; | 22 bool useColor; |
| 23 | 23 |
| 24 VMConfiguration() : | 24 VMConfiguration() : |
| (...skipping 27 matching lines...) Expand all Loading... |
| 52 exit(status); | 52 exit(status); |
| 53 }); | 53 }); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 void useVMConfiguration() { | 57 void useVMConfiguration() { |
| 58 unittestConfiguration = _singleton; | 58 unittestConfiguration = _singleton; |
| 59 } | 59 } |
| 60 | 60 |
| 61 final _singleton = new VMConfiguration(); | 61 final _singleton = new VMConfiguration(); |
| OLD | NEW |