OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * This is a helper for run.sh. We try to run all of the Dart code in one |
| 7 * instance of the Dart VM to reduce warm-up time. |
| 8 */ |
| 9 library run_impl; |
| 10 |
| 11 import 'dart:io'; |
| 12 import 'package:unittest/unittest.dart'; |
| 13 import 'package:unittest/compact_vm_config.dart'; |
| 14 import 'testing.dart'; |
| 15 |
| 16 import 'compiler_test.dart' as compiler_test; |
| 17 import 'declaration_test.dart' as declaration_test; |
| 18 import 'var_test.dart' as var_test; |
| 19 import 'nested_test.dart' as nested_test; |
| 20 import 'error_test.dart' as error_test; |
| 21 import 'selector_test.dart' as selector_test; |
| 22 import 'visitor_test.dart' as visitor_test; |
| 23 |
| 24 main() { |
| 25 var args = new Options().arguments; |
| 26 |
| 27 var pattern = new RegExp(args.length > 0 ? args[0] : '.'); |
| 28 |
| 29 useCompactVMConfiguration(); |
| 30 useMockMessages(); |
| 31 |
| 32 if (pattern.hasMatch('compiler_test.dart')) compiler_test.main(); |
| 33 if (pattern.hasMatch('declaration_test.dart')) declaration_test.main(); |
| 34 if (pattern.hasMatch('var_test.dart')) var_test.main(); |
| 35 if (pattern.hasMatch('nested_test.dart')) nested_test.main(); |
| 36 if (pattern.hasMatch('selector_test.dart')) selector_test.main(); |
| 37 if (pattern.hasMatch('visitor_test.dart')) visitor_test.main(); |
| 38 if (pattern.hasMatch('error_test.dart')) error_test.main(); |
| 39 } |
OLD | NEW |