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

Side by Side Diff: dart/tests/try/poi/compiler_test_case.dart

Issue 809313006: Implement incremental tests with multiple files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42458. Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/tests/try/web/incremental_compilation_update_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // Helper class for writing compiler tests. 5 // Helper class for writing compiler tests.
6 library trydart.compiler_test_case; 6 library trydart.compiler_test_case;
7 7
8 import 'dart:async' show 8 import 'dart:async' show
9 Future; 9 Future;
10 10
(...skipping 13 matching lines...) Expand all
24 import 'package:compiler/src/elements/elements.dart' show 24 import 'package:compiler/src/elements/elements.dart' show
25 LibraryElement; 25 LibraryElement;
26 26
27 export 'package:compiler/src/elements/elements.dart' show 27 export 'package:compiler/src/elements/elements.dart' show
28 LibraryElement; 28 LibraryElement;
29 29
30 const String CONSTANT_CLASS = 'class Constant { const Constant(); }'; 30 const String CONSTANT_CLASS = 'class Constant { const Constant(); }';
31 31
32 const String SCHEME = 'org.trydart.compiler-test-case'; 32 const String SCHEME = 'org.trydart.compiler-test-case';
33 33
34 Uri customUri(String path) => Uri.parse('$SCHEME://$path'); 34 Uri customUri(String path) => Uri.parse('$SCHEME:/$path');
35 35
36 Future runTests(List<CompilerTestCase> tests) { 36 Future runTests(List<CompilerTestCase> tests) {
37 asyncTest(() => Future.forEach(tests, runTest)); 37 asyncTest(() => Future.forEach(tests, runTest));
38 } 38 }
39 39
40 Future runTest(CompilerTestCase test) { 40 Future runTest(CompilerTestCase test) {
41 print('\n{{{\n$test\n\n=== Test Output:\n'); 41 print('\n{{{\n$test\n\n=== Test Output:\n');
42 return test.run().then((_) { 42 return test.run().then((_) {
43 print('}}}'); 43 print('}}}');
44 }); 44 });
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 /// Returns a future for the mainApp after running the compiler. 78 /// Returns a future for the mainApp after running the compiler.
79 Future<LibraryElement> compile() { 79 Future<LibraryElement> compile() {
80 return loadMainApp().then((LibraryElement library) { 80 return loadMainApp().then((LibraryElement library) {
81 return compiler.runCompiler(scriptUri).then((_) => library); 81 return compiler.runCompiler(scriptUri).then((_) => library);
82 }); 82 });
83 } 83 }
84 84
85 String toString() => source; 85 String toString() => source;
86 } 86 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/try/web/incremental_compilation_update_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698