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

Side by Side Diff: test/js/builder_test.dart

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « test/codegen_test.dart ('k') | test/samples/fieldtest.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 import 'package:dev_compiler/src/js/js_ast.dart'; 1 import 'package:dev_compiler/src/js_ast/js_ast.dart';
2 import 'package:test/test.dart'; 2 import 'package:test/test.dart';
3 3
4 final _prenumberedPlaceholders = new RegExp(r'#\d+'); 4 final _prenumberedPlaceholders = new RegExp(r'#\d+');
5 5
6 _parser(String src) => 6 _parser(String src) =>
7 new MiniJsParser(src.replaceAll(_prenumberedPlaceholders, '#')); 7 new MiniJsParser(src.replaceAll(_prenumberedPlaceholders, '#'));
8 8
9 _check(Node node, String expected) => 9 _check(Node node, String expected) =>
10 expect(node.toString(), 'js_ast `$expected`'); 10 expect(node.toString(), 'js_ast `$expected`');
11 11
(...skipping 24 matching lines...) Expand all
36 '}'); 36 '}');
37 }); 37 });
38 test('parses statements', () { 38 test('parses statements', () {
39 _checkStatement('for (let i = 0; i < 10; i++) {\n}\n'); 39 _checkStatement('for (let i = 0; i < 10; i++) {\n}\n');
40 _checkStatement('for (let i = 0, j = 1; i < 10; i++) {\n}\n'); 40 _checkStatement('for (let i = 0, j = 1; i < 10; i++) {\n}\n');
41 _checkStatement('var [x, y = []] = list;\n'); 41 _checkStatement('var [x, y = []] = list;\n');
42 _checkStatement('var {x, y = {x: y}} = obj;\n'); 42 _checkStatement('var {x, y = {x: y}} = obj;\n');
43 }); 43 });
44 }); 44 });
45 } 45 }
OLDNEW
« no previous file with comments | « test/codegen_test.dart ('k') | test/samples/fieldtest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698