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..e9bc2e1b6e37b2794c90affc148b52b6a4334c46 100644 |
--- a/tests/compiler/dart2js/js_parser_statements_test.dart |
+++ b/tests/compiler/dart2js/js_parser_statements_test.dart |
@@ -325,5 +325,25 @@ 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;'), |
+ testStatement('var # = 3', |
+ [new jsAst.VariableDeclaration('x')], |
+ 'var x = 3;'), |
+ 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('function #() {}', |
+ [new jsAst.VariableDeclaration('x')], |
+ 'function x() {\n}'), |
+ testStatement('try {} catch (#) {}', ['x'], 'try {\n} catch (x) {\n}'), |
+ testStatement('try {} catch (#a) {}', {"a": 'x'}, 'try {\n} catch (x) {\n}'), |
+ testStatement('try {} catch (#a) {}', |
+ {"a": new jsAst.VariableDeclaration('x')}, |
+ 'try {\n} catch (x) {\n}'), |
])); |
} |