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

Unified Diff: pkg/polymer_expressions/test/parser_test.dart

Issue 139903008: List literals in polymer_expressions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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: pkg/polymer_expressions/test/parser_test.dart
diff --git a/pkg/polymer_expressions/test/parser_test.dart b/pkg/polymer_expressions/test/parser_test.dart
index f98c1b74e223f767c8676587d926cae271fc20df..f943d221b9022ac7ea824cd1052de3ab75a35da9 100644
--- a/pkg/polymer_expressions/test/parser_test.dart
+++ b/pkg/polymer_expressions/test/parser_test.dart
@@ -210,5 +210,13 @@ main() {
getter(mapLiteral([mapLiteralEntry(literal('a'), literal(1))]),
'length'));
});
+
+ test('should parse list literals', () {
+ expectParse('[1, "a", b]',
+ listLiteral([literal(1), literal('a'), ident('b')]));
+ expectParse('[[1, 2], [3, 4]]',
+ listLiteral([listLiteral([literal(1), literal(2)]),
+ listLiteral([literal(3), literal(4)])]));
+ });
});
}

Powered by Google App Engine
This is Rietveld 408576698