| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library visitor_test; | 5 library visitor_test; |
| 6 | 6 |
| 7 import 'package:polymer_expressions/parser.dart'; | 7 import 'package:polymer_expressions/parser.dart'; |
| 8 import 'package:polymer_expressions/visitor.dart'; | 8 import 'package:polymer_expressions/visitor.dart'; |
| 9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 10 | 10 |
| 11 main() { | 11 main() { |
| 12 | 12 |
| 13 group('visitor', () { | 13 group('visitor', () { |
| 14 | 14 |
| 15 // regression test | 15 // regression test |
| 16 test('should not infinitely recurse on parenthesized expressions', () { | 16 test('should not infinitely recurse on parenthesized expressions', () { |
| 17 var visitor = new TestVisitor(); | 17 var visitor = new TestVisitor(); |
| 18 var expr = new Parser('(1)').parse(); | 18 var expr = new Parser('(1)').parse(); |
| 19 visitor.visit(expr); | 19 visitor.visit(expr); |
| 20 }); | 20 }); |
| 21 | 21 |
| 22 }); | 22 }); |
| 23 } | 23 } |
| 24 | 24 |
| 25 class TestVisitor extends RecursiveVisitor { | 25 class TestVisitor extends RecursiveVisitor {} |
| 26 visitExpression(e) => null; | |
| 27 } | |
| OLD | NEW |