| 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 f943d221b9022ac7ea824cd1052de3ab75a35da9..e57d11a3ccafb5ef1b997b9cc9c2822e459da791 100644
|
| --- a/pkg/polymer_expressions/test/parser_test.dart
|
| +++ b/pkg/polymer_expressions/test/parser_test.dart
|
| @@ -52,15 +52,14 @@ main() {
|
| expectParse('-1.23', literal(-1.23));
|
| });
|
|
|
| - test('should parse a plus operator with literals', () {
|
| - expectParse('1 + 2', binary(literal(1), '+', literal(2)));
|
| - });
|
| -
|
| test('should parse binary operators', () {
|
| - expectParse('a && b', binary(ident('a'), '&&', ident('b')));
|
| - expectParse('1 && 2', binary(literal(1), '&&', literal(2)));
|
| - expectParse('false && true', binary(literal(false), '&&', literal(true)));
|
| - expectParse('false || true', binary(literal(false), '||', literal(true)));
|
| + var operators = ['+', '-', '*', '/', '%', '^', '==', '!=', '>', '<',
|
| + '>=', '<=', '||', '&&', '&'];
|
| + for (var op in operators) {
|
| + expectParse('a $op b', binary(ident('a'), op, ident('b')));
|
| + expectParse('1 $op 2', binary(literal(1), op, literal(2)));
|
| + expectParse('this $op null', binary(ident('this'), op, literal(null)));
|
| + }
|
| });
|
|
|
| test('should give multiply higher associativity than plus', () {
|
| @@ -71,14 +70,6 @@ main() {
|
| binary(ident('b'), '*', ident('c'))));
|
| });
|
|
|
| - test('should give multiply higher associativity than plus 2', () {
|
| - expectParse('a * b + c',
|
| - binary(
|
| - binary(ident('a'), '*', ident('b')),
|
| - '+',
|
| - ident('c')));
|
| - });
|
| -
|
| test('should parse a dot operator', () {
|
| expectParse('a.b', getter(ident('a'), 'b'));
|
| });
|
|
|