Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: pkg/analyzer/test/dart/ast/ast_test.dart

Issue 2298913003: Pull in test_reflective_loader 0.0.4 and switch analyzer to it. (Closed)
Patch Set: Fixes for review comments. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.ast_test; 5 library analyzer.test.dart.ast.ast_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/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/src/dart/ast/token.dart'; 9 import 'package:analyzer/src/dart/ast/token.dart';
10 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 10 import 'package:analyzer/src/generated/testing/ast_factory.dart';
11 import 'package:analyzer/src/generated/testing/token_factory.dart'; 11 import 'package:analyzer/src/generated/testing/token_factory.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart';
12 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
13 14
14 import '../../generated/parser_test.dart' show ParserTestCase; 15 import '../../generated/parser_test.dart' show ParserTestCase;
15 import '../../generated/test_support.dart'; 16 import '../../generated/test_support.dart';
16 import '../../reflective_tests.dart';
17 import '../../utils.dart'; 17 import '../../utils.dart';
18 18
19 main() { 19 main() {
20 initializeTestEnvironment(); 20 initializeTestEnvironment();
21 runReflectiveTests(ClassDeclarationTest); 21 defineReflectiveTests(ClassDeclarationTest);
22 runReflectiveTests(ClassTypeAliasTest); 22 defineReflectiveTests(ClassTypeAliasTest);
23 runReflectiveTests(ConstructorDeclarationTest); 23 defineReflectiveTests(ConstructorDeclarationTest);
24 runReflectiveTests(FieldFormalParameterTest); 24 defineReflectiveTests(FieldFormalParameterTest);
25 runReflectiveTests(IndexExpressionTest); 25 defineReflectiveTests(IndexExpressionTest);
26 runReflectiveTests(MethodDeclarationTest); 26 defineReflectiveTests(MethodDeclarationTest);
27 runReflectiveTests(NodeListTest); 27 defineReflectiveTests(NodeListTest);
28 runReflectiveTests(SimpleIdentifierTest); 28 defineReflectiveTests(SimpleIdentifierTest);
29 runReflectiveTests(SimpleStringLiteralTest); 29 defineReflectiveTests(SimpleStringLiteralTest);
30 runReflectiveTests(StringInterpolationTest); 30 defineReflectiveTests(StringInterpolationTest);
31 runReflectiveTests(VariableDeclarationTest); 31 defineReflectiveTests(VariableDeclarationTest);
32 } 32 }
33 33
34 @reflectiveTest 34 @reflectiveTest
35 class ClassDeclarationTest extends ParserTestCase { 35 class ClassDeclarationTest extends ParserTestCase {
36 void test_getConstructor() { 36 void test_getConstructor() {
37 List<ConstructorInitializer> initializers = 37 List<ConstructorInitializer> initializers =
38 new List<ConstructorInitializer>(); 38 new List<ConstructorInitializer>();
39 ConstructorDeclaration defaultConstructor = 39 ConstructorDeclaration defaultConstructor =
40 AstFactory.constructorDeclaration(AstFactory.identifier3("Test"), null, 40 AstFactory.constructorDeclaration(AstFactory.identifier3("Test"), null,
41 AstFactory.formalParameterList(), initializers); 41 AstFactory.formalParameterList(), initializers);
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 final int ordinal; 1227 final int ordinal;
1228 1228
1229 const _WrapperKind(this.name, this.ordinal); 1229 const _WrapperKind(this.name, this.ordinal);
1230 1230
1231 int get hashCode => ordinal; 1231 int get hashCode => ordinal;
1232 1232
1233 int compareTo(_WrapperKind other) => ordinal - other.ordinal; 1233 int compareTo(_WrapperKind other) => ordinal - other.ordinal;
1234 1234
1235 String toString() => name; 1235 String toString() => name;
1236 } 1236 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698