| 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_reflective_loader/test_reflective_loader.dart'; | 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 10 import 'package:unittest/unittest.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'; | 14 import '../../utils.dart'; |
| 15 | 15 |
| 16 main() { | 16 main() { |
| 17 initializeTestEnvironment(); | 17 initializeTestEnvironment(); |
| 18 defineReflectiveTests(BreadthFirstVisitorTest); | 18 defineReflectiveSuite(() { |
| 19 defineReflectiveTests(BreadthFirstVisitorTest); |
| 20 }); |
| 19 } | 21 } |
| 20 | 22 |
| 21 @reflectiveTest | 23 @reflectiveTest |
| 22 class BreadthFirstVisitorTest extends ParserTestCase { | 24 class BreadthFirstVisitorTest extends ParserTestCase { |
| 23 void test_it() { | 25 void test_it() { |
| 24 String source = r''' | 26 String source = r''' |
| 25 class A { | 27 class A { |
| 26 bool get g => true; | 28 bool get g => true; |
| 27 } | 29 } |
| 28 class B { | 30 class B { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 List<AstNode> nodes; | 72 List<AstNode> nodes; |
| 71 | 73 |
| 72 _BreadthFirstVisitorTestHelper(this.nodes) : super(); | 74 _BreadthFirstVisitorTestHelper(this.nodes) : super(); |
| 73 | 75 |
| 74 @override | 76 @override |
| 75 Object visitNode(AstNode node) { | 77 Object visitNode(AstNode node) { |
| 76 nodes.add(node); | 78 nodes.add(node); |
| 77 return super.visitNode(node); | 79 return super.visitNode(node); |
| 78 } | 80 } |
| 79 } | 81 } |
| OLD | NEW |