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

Unified Diff: tests/utils/dummy_compiler_test.dart

Issue 12041043: Make dummy_compiler_test and recursive_import_test work. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/utils/recursive_import_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/utils/dummy_compiler_test.dart
diff --git a/tests/utils/dummy_compiler_test.dart b/tests/utils/dummy_compiler_test.dart
index 9f1685956ce3b92b40b71244a0e2eff3226d7f42..5bd9dce662330073cd98e9048969cc882f845033 100644
--- a/tests/utils/dummy_compiler_test.dart
+++ b/tests/utils/dummy_compiler_test.dart
@@ -79,11 +79,16 @@ void handler(Uri uri, int begin, int end, String message, Diagnostic kind) {
}
main() {
- String code = compile(new Uri.fromComponents(scheme: 'main'),
- new Uri.fromComponents(scheme: 'lib', path: '/'),
- new Uri.fromComponents(scheme: 'package', path: '/'),
- provider, handler).value;
- if (code == null) {
- throw 'Compilation failed';
- }
+ Future<String> result =
+ compile(new Uri.fromComponents(scheme: 'main'),
+ new Uri.fromComponents(scheme: 'lib', path: '/'),
+ new Uri.fromComponents(scheme: 'package', path: '/'),
+ provider, handler);
+ result.then((String code) {
+ if (code == null) {
+ throw 'Compilation failed';
+ }
+ }, onError: (AsyncError e) {
+ throw 'Compilation failed';
+ });
}
« no previous file with comments | « no previous file | tests/utils/recursive_import_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698