| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analyzer.test.dart.ast.visitor_test; | 5 library analyzer.test.dart.ast.visitor_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/visitor.dart'; | 8 import 'package:analyzer/dart/ast/visitor.dart'; |
| 9 import 'package:test/test.dart'; | 9 import 'package:test/test.dart'; |
| 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 11 | 11 |
| 12 import '../../generated/parser_test.dart' show ParserTestCase; | 12 import '../../generated/parser_test.dart' show ParserTestCase; |
| 13 import '../../generated/test_support.dart'; | 13 import '../../generated/test_support.dart'; |
| 14 import '../../utils.dart'; | |
| 15 | 14 |
| 16 main() { | 15 main() { |
| 17 initializeTestEnvironment(); | |
| 18 defineReflectiveSuite(() { | 16 defineReflectiveSuite(() { |
| 19 defineReflectiveTests(BreadthFirstVisitorTest); | 17 defineReflectiveTests(BreadthFirstVisitorTest); |
| 20 }); | 18 }); |
| 21 } | 19 } |
| 22 | 20 |
| 23 @reflectiveTest | 21 @reflectiveTest |
| 24 class BreadthFirstVisitorTest extends ParserTestCase { | 22 class BreadthFirstVisitorTest extends ParserTestCase { |
| 25 void test_it() { | 23 void test_it() { |
| 26 String source = r''' | 24 String source = r''' |
| 27 class A { | 25 class A { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 List<AstNode> nodes; | 70 List<AstNode> nodes; |
| 73 | 71 |
| 74 _BreadthFirstVisitorTestHelper(this.nodes) : super(); | 72 _BreadthFirstVisitorTestHelper(this.nodes) : super(); |
| 75 | 73 |
| 76 @override | 74 @override |
| 77 Object visitNode(AstNode node) { | 75 Object visitNode(AstNode node) { |
| 78 nodes.add(node); | 76 nodes.add(node); |
| 79 return super.visitNode(node); | 77 return super.visitNode(node); |
| 80 } | 78 } |
| 81 } | 79 } |
| OLD | NEW |