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

Unified Diff: pkg/polymer_expressions/test/tokenizer_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/tokenizer_test.dart
diff --git a/pkg/polymer_expressions/test/tokenizer_test.dart b/pkg/polymer_expressions/test/tokenizer_test.dart
index a29ee649c78e8a89704fd17b0ae5e04621af99bc..a93dce73ba615fdc61edaaad20d7c7e761bf5da8 100644
--- a/pkg/polymer_expressions/test/tokenizer_test.dart
+++ b/pkg/polymer_expressions/test/tokenizer_test.dart
@@ -109,6 +109,17 @@ main() {
t(GROUPER_TOKEN, '}')]);
});
+ test('should tokenize lists', () {
+ expectTokens("[1, 'a', b]", [
+ t(GROUPER_TOKEN, '['),
+ t(INTEGER_TOKEN, '1'),
+ t(COMMA_TOKEN, ','),
+ t(STRING_TOKEN, 'a'),
+ t(COMMA_TOKEN, ','),
+ t(IDENTIFIER_TOKEN, 'b'),
+ t(GROUPER_TOKEN, ']')]);
+ });
+
test('should tokenize integers', () {
expectTokens('123', [t(INTEGER_TOKEN, '123')]);
expectTokens('+123', [t(OPERATOR_TOKEN, '+'), t(INTEGER_TOKEN, '123')]);
« pkg/polymer_expressions/lib/eval.dart ('K') | « pkg/polymer_expressions/test/parser_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698