OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 library test.run; | 6 library test.run; |
7 | 7 |
8 import 'package:unittest/compact_vm_config.dart'; | 8 import 'package:test/compact_vm_config.dart'; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:test/test.dart'; |
10 import 'dart:io' show Options; | |
11 | 10 |
12 import 'builder_test.dart' as builder_test; | 11 import 'builder_test.dart' as builder_test; |
13 import 'end2end_test.dart' as end2end_test; | 12 import 'end2end_test.dart' as end2end_test; |
14 import 'parser_test.dart' as parser_test; | 13 import 'parser_test.dart' as parser_test; |
15 import 'printer_test.dart' as printer_test; | 14 import 'printer_test.dart' as printer_test; |
16 import 'refactor_test.dart' as refactor_test; | 15 import 'refactor_test.dart' as refactor_test; |
17 import 'utils_test.dart' as utils_test; | 16 import 'utils_test.dart' as utils_test; |
18 import 'vlq_test.dart' as vlq_test; | 17 import 'vlq_test.dart' as vlq_test; |
19 | 18 |
20 main(List<String> arguments) { | 19 main(List<String> arguments) { |
21 var pattern = new RegExp(arguments.length > 0 ? arguments[0] : '.'); | 20 var pattern = new RegExp(arguments.length > 0 ? arguments[0] : '.'); |
22 useCompactVMConfiguration(); | 21 useCompactVMConfiguration(); |
23 | 22 |
24 void addGroup(testFile, testMain) { | 23 void addGroup(testFile, testMain) { |
25 if (pattern.hasMatch(testFile)) { | 24 if (pattern.hasMatch(testFile)) { |
26 group(testFile.replaceAll('_test.dart', ':'), testMain); | 25 group(testFile.replaceAll('_test.dart', ':'), testMain); |
27 } | 26 } |
28 } | 27 } |
29 | 28 |
30 addGroup('builder_test.dart', builder_test.main); | 29 addGroup('builder_test.dart', builder_test.main); |
31 addGroup('end2end_test.dart', end2end_test.main); | 30 addGroup('end2end_test.dart', end2end_test.main); |
32 addGroup('parser_test.dart', parser_test.main); | 31 addGroup('parser_test.dart', parser_test.main); |
33 addGroup('printer_test.dart', printer_test.main); | 32 addGroup('printer_test.dart', printer_test.main); |
34 addGroup('refactor_test.dart', refactor_test.main); | 33 addGroup('refactor_test.dart', refactor_test.main); |
35 addGroup('utils_test.dart', utils_test.main); | 34 addGroup('utils_test.dart', utils_test.main); |
36 addGroup('vlq_test.dart', vlq_test.main); | 35 addGroup('vlq_test.dart', vlq_test.main); |
37 } | 36 } |
OLD | NEW |