| Index: tests/compiler/dart2js/parser_test.dart
|
| diff --git a/tests/compiler/dart2js/parser_test.dart b/tests/compiler/dart2js/parser_test.dart
|
| index d68d23f039ea39f47f99b4a96e7c11b2dd7a1da0..28e53e87e484e06e24bc3c297828f5b5b54536d1 100644
|
| --- a/tests/compiler/dart2js/parser_test.dart
|
| +++ b/tests/compiler/dart2js/parser_test.dart
|
| @@ -254,6 +254,18 @@ void testPostfix() {
|
| Expect.isTrue(sendSet.arguments.isEmpty());
|
| }
|
|
|
| +void testOperatorParse() {
|
| + FunctionDeclaration node = parseStatement('operator negate() => null;');
|
| + FunctionExpression function = node.function;
|
| + Send name = function.name.asSend();
|
| + Expect.isNotNull(name);
|
| + Expect.stringEquals('operator', name.receiver.source.stringValue);
|
| + Expect.stringEquals('negate', name.selector.source.stringValue);
|
| + Expect.isTrue(function.parameters.isEmpty());
|
| + Expect.isNull(function.returnType);
|
| + Expect.isNull(function.getOrSet);
|
| +}
|
| +
|
| void main() {
|
| testGenericTypes();
|
| // TODO(ahe): Enable this test when we handle library prefixes.
|
| @@ -267,4 +279,5 @@ void main() {
|
| testAssignment();
|
| testIndex();
|
| testPostfix();
|
| + testOperatorParse();
|
| }
|
|
|