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

Side by Side Diff: tests/compiler/dart2js/async_await_js_transform_test.dart

Issue 1284673003: Move dart2jslib parts into separate libraries. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix try. Created 5 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "package:compiler/src/js/js.dart"; 6 import "package:compiler/src/js/js.dart";
7 import "package:compiler/src/js/rewrite_async.dart"; 7 import "package:compiler/src/js/rewrite_async.dart";
8 import "package:compiler/src/js_backend/js_backend.dart" show StringBackedName; 8 import "package:compiler/src/js_backend/js_backend.dart" show StringBackedName;
9 9
10 import "backend_dart/dart_printer_test.dart" show PrintDiagnosticListener;
11
12 void testTransform(String source, String expected, AsyncRewriterBase rewriter) { 10 void testTransform(String source, String expected, AsyncRewriterBase rewriter) {
13 Fun fun = js(source); 11 Fun fun = js(source);
14 Fun rewritten = rewriter.rewrite(fun); 12 Fun rewritten = rewriter.rewrite(fun);
15 13
16 JavaScriptPrintingOptions options = new JavaScriptPrintingOptions(); 14 JavaScriptPrintingOptions options = new JavaScriptPrintingOptions();
17 SimpleJavaScriptPrintingContext context = 15 SimpleJavaScriptPrintingContext context =
18 new SimpleJavaScriptPrintingContext(); 16 new SimpleJavaScriptPrintingContext();
19 Printer printer = new Printer(options, context); 17 Printer printer = new Printer(options, context);
20 printer.visit(rewritten); 18 printer.visit(rewritten);
21 Expect.stringEquals(expected, context.getText()); 19 Expect.stringEquals(expected, context.getText());
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 // return 1229 // return
1232 return endOfIteration(); 1230 return endOfIteration();
1233 case 2: 1231 case 2:
1234 // rethrow 1232 // rethrow
1235 return uncaughtError(__currentError); 1233 return uncaughtError(__currentError);
1236 } 1234 }
1237 }; 1235 };
1238 }); 1236 });
1239 }"""); 1237 }""");
1240 } 1238 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/analyze_unused_dart2js_test.dart ('k') | tests/compiler/dart2js/backend_dart/dart_printer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698