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

Unified Diff: tests/compiler/dart2js/js_parser_statements_test.dart

Issue 932053002: Support for interpolated declarations in the js parser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
Index: tests/compiler/dart2js/js_parser_statements_test.dart
diff --git a/tests/compiler/dart2js/js_parser_statements_test.dart b/tests/compiler/dart2js/js_parser_statements_test.dart
index 38ccd1c27e2df69a0d5513db44f52a922299da30..22d01ce1a50459e1aa4feaab25aa3bcd8f512ec9 100644
--- a/tests/compiler/dart2js/js_parser_statements_test.dart
+++ b/tests/compiler/dart2js/js_parser_statements_test.dart
@@ -325,5 +325,16 @@ switch (true) {
testStatement('label: while (a) { label2: break label;}', [],
'label:\n while (a) {\n label2:\n break label;\n }'),
+
+ testStatement('var # = 3', ['x'], 'var x = 3;'),
floitsch 2015/02/18 12:28:14 Add tests with "new js.Declaration".
sigurdm 2015/02/18 13:03:09 Done.
+ testStatement('var # = 3, # = #',
+ ['x', 'y', js.number(2)],
+ 'var x = 3, y = 2;'),
+ testStatement('var #a = 3, #b = #c',
+ {"a": 'x', "b": 'y', "c": js.number(2)},
+ 'var x = 3, y = 2;'),
+ testStatement('function #() {}', ['x'], 'function x() {\n}'),
+ testStatement('try {} catch (#) {}', ['x'], 'try {} catch (x) {}'),
+ testStatement('try {} catch (#a) {}', {"a": 'x'}, 'try {} catch (x) {}'),
]));
}
« pkg/compiler/lib/src/js/rewrite_async.dart ('K') | « pkg/compiler/lib/src/js/template.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698