Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: test/run_all.dart

Issue 22825012: Introduce transformers for: (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 * This is a helper for run.sh. We try to run all of the Dart code in one 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. 7 * instance of the Dart VM to reduce warm-up time.
8 */ 8 */
9 library run_impl; 9 library run_impl;
10 10
11 import 'dart:io'; 11 import 'dart:io';
12 import 'package:unittest/compact_vm_config.dart'; 12 import 'package:unittest/compact_vm_config.dart';
13 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
14 import 'package:polymer/testing/content_shell_test.dart'; 14 import 'package:polymer/testing/content_shell_test.dart';
15 15
16 import 'css_test.dart' as css_test; 16 import 'css_test.dart' as css_test;
17 import 'compiler_test.dart' as compiler_test; 17 import 'compiler_test.dart' as compiler_test;
18 import 'paths_test.dart' as paths_test; 18 import 'paths_test.dart' as paths_test;
19 import 'utils_test.dart' as utils_test; 19 import 'utils_test.dart' as utils_test;
20 import 'transform/code_extractor_test.dart' as code_extractor_test;
21 import 'transform/import_inliner_test.dart' as import_inliner_test;
22 import 'transform/script_compactor_test.dart' as script_compactor_test;
20 23
21 main() { 24 main() {
22 var args = new Options().arguments; 25 var args = new Options().arguments;
23 var pattern = new RegExp(args.length > 0 ? args[0] : '.'); 26 var pattern = new RegExp(args.length > 0 ? args[0] : '.');
24 27
25 useCompactVMConfiguration(); 28 useCompactVMConfiguration();
26 29
27 void addGroup(testFile, testMain) { 30 void addGroup(testFile, testMain) {
28 if (pattern.hasMatch(testFile)) { 31 if (pattern.hasMatch(testFile)) {
29 group(testFile.replaceAll('_test.dart', ':'), testMain); 32 group(testFile.replaceAll('_test.dart', ':'), testMain);
30 } 33 }
31 } 34 }
32 35
33 addGroup('compiler_test.dart', compiler_test.main); 36 addGroup('compiler_test.dart', compiler_test.main);
34 addGroup('css_test.dart', css_test.main); 37 addGroup('css_test.dart', css_test.main);
35 addGroup('paths_test.dart', paths_test.main); 38 addGroup('paths_test.dart', paths_test.main);
36 addGroup('utils_test.dart', utils_test.main); 39 addGroup('utils_test.dart', utils_test.main);
40 addGroup('transform/code_extractor_test.dart', code_extractor_test.main);
41 addGroup('transform/import_inliner_test.dart', import_inliner_test.main);
42 addGroup('transform/script_compactor_test.dart', script_compactor_test.main);
37 43
38 // TODO(jmessery): consider restoring these where applicable. 44 // TODO(jmessery): consider restoring these where applicable.
39 // We'll probably want to use fancy-syntax support. 45 // We'll probably want to use fancy-syntax support.
40 //renderTests('data/input', 'data/input', 'data/expected', 'data/out', 46 //renderTests('data/input', 'data/input', 'data/expected', 'data/out',
41 // TODO(jmesserly): make these configurable 47 // TODO(jmesserly): make these configurable
42 // ['--no-js', '--no-shadowdom']..addAll(args)); 48 // ['--no-js', '--no-shadowdom']..addAll(args));
43 49
44 endToEndTests('data/unit/', 'data/out'); 50 endToEndTests('data/unit/', 'data/out');
45 51
46 // Note: if you're adding more render test suites, make sure to update run.sh 52 // Note: if you're adding more render test suites, make sure to update run.sh
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 arguments: args, pattern: pattern, deleteDir: deleteDirectory); 94 arguments: args, pattern: pattern, deleteDir: deleteDirectory);
89 } 95 }
90 96
91 void cssCompileShadowDOMTest(String path, String pattern, 97 void cssCompileShadowDOMTest(String path, String pattern,
92 [bool deleteDirectory = true]) { 98 [bool deleteDirectory = true]) {
93 var args = ['--no-css']; 99 var args = ['--no-css'];
94 renderTests(path, path, '$path/expected', '$path/out', 100 renderTests(path, path, '$path/expected', '$path/out',
95 arguments: args, pattern: pattern, 101 arguments: args, pattern: pattern,
96 deleteDir: deleteDirectory); 102 deleteDir: deleteDirectory);
97 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698