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

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

Issue 10689104: Fix const unparse. Example: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Anton comments Created 8 years, 5 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/unparser_test.dart
diff --git a/tests/compiler/dart2js/unparser_test.dart b/tests/compiler/dart2js/unparser_test.dart
index a810b34caa79d267c299f7eb65ded1f4d077f234..112bc2fae70f0f55e3dc514774c451e309042fd4 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -94,6 +94,13 @@ testPrefixIncrements() {
testUnparse('++a[++b[i]];');
}
+testConstModifier() {
+ testUnparse('foo([var a=const []]){}');
+ testUnparse('foo([var a=const{}]){}');
+ testUnparse('foo(){var a=const []; var b=const{};}');
+ testUnparse('foo([var a=const [const{"a": const [1, 2, 3]}]]){}');
+}
+
testSimpleFileUnparse() {
final src = '''
should_be_dropped() {
@@ -119,5 +126,6 @@ main() {
testIndexedOperatorDecl();
testNativeMethods();
testPrefixIncrements();
+ testConstModifier();
testSimpleFileUnparse();
}

Powered by Google App Engine
This is Rietveld 408576698