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

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

Issue 141703024: Refactor of PolymerExpressions. Adds "as" expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: syntax, bindings, and globals tests now passing in Safari Created 6 years, 7 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
« no previous file with comments | « pkg/polymer_expressions/test/syntax_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a93dce73ba615fdc61edaaad20d7c7e761bf5da8..9689b869ba104b604fcb59fd0d702b268c4d6c26 100644
--- a/pkg/polymer_expressions/test/tokenizer_test.dart
+++ b/pkg/polymer_expressions/test/tokenizer_test.dart
@@ -67,15 +67,23 @@ main() {
t(IDENTIFIER_TOKEN, 'c')]);
});
- test('should tokenize an iterate expression with "in" keyword', () {
+ test('should tokenize "in" expressions', () {
expectTokens('item in items', [
t(IDENTIFIER_TOKEN, 'item'),
t(KEYWORD_TOKEN, 'in'),
t(IDENTIFIER_TOKEN, 'items')]);
});
+ test('should takenize an "as" expression', () {
+ expectTokens('a as b', [
+ t(IDENTIFIER_TOKEN, 'a'),
+ t(KEYWORD_TOKEN, 'as'),
+ t(IDENTIFIER_TOKEN, 'b')]);
+ });
+
test('should tokenize keywords', () {
expectTokens('in', [t(KEYWORD_TOKEN, 'in')]);
+ expectTokens('as', [t(KEYWORD_TOKEN, 'as')]);
expectTokens('this', [t(KEYWORD_TOKEN, 'this')]);
});
« no previous file with comments | « pkg/polymer_expressions/test/syntax_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698