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

Side by Side Diff: pkg/analyzer/test/generated/utilities_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.generated.utilities_test; 5 library analyzer.test.generated.utilities_test;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
11 import 'package:analyzer/src/dart/ast/token.dart'; 11 import 'package:analyzer/src/dart/ast/token.dart';
12 import 'package:analyzer/src/dart/ast/utilities.dart'; 12 import 'package:analyzer/src/dart/ast/utilities.dart';
13 import 'package:analyzer/src/dart/scanner/reader.dart'; 13 import 'package:analyzer/src/dart/scanner/reader.dart';
14 import 'package:analyzer/src/dart/scanner/scanner.dart'; 14 import 'package:analyzer/src/dart/scanner/scanner.dart';
15 import 'package:analyzer/src/generated/java_core.dart'; 15 import 'package:analyzer/src/generated/java_core.dart';
16 import 'package:analyzer/src/generated/java_engine.dart'; 16 import 'package:analyzer/src/generated/java_engine.dart';
17 import 'package:analyzer/src/generated/parser.dart'; 17 import 'package:analyzer/src/generated/parser.dart';
18 import 'package:analyzer/src/generated/source.dart'; 18 import 'package:analyzer/src/generated/source.dart';
19 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 19 import 'package:analyzer/src/generated/testing/ast_factory.dart';
20 import 'package:analyzer/src/generated/testing/token_factory.dart'; 20 import 'package:analyzer/src/generated/testing/token_factory.dart';
21 import 'package:analyzer/src/generated/utilities_collection.dart'; 21 import 'package:analyzer/src/generated/utilities_collection.dart';
22 import 'package:test_reflective_loader/test_reflective_loader.dart';
22 import 'package:unittest/unittest.dart'; 23 import 'package:unittest/unittest.dart';
23 24
24 import '../reflective_tests.dart';
25 import '../utils.dart'; 25 import '../utils.dart';
26 import 'test_support.dart'; 26 import 'test_support.dart';
27 27
28 main() { 28 main() {
29 initializeTestEnvironment(); 29 initializeTestEnvironment();
30 runReflectiveTests(AstClonerTest); 30 defineReflectiveTests(AstClonerTest);
31 runReflectiveTests(NodeReplacerTest); 31 defineReflectiveTests(NodeReplacerTest);
32 runReflectiveTests(LineInfoTest); 32 defineReflectiveTests(LineInfoTest);
33 runReflectiveTests(SourceRangeTest); 33 defineReflectiveTests(SourceRangeTest);
34 runReflectiveTests(BooleanArrayTest); 34 defineReflectiveTests(BooleanArrayTest);
35 runReflectiveTests(DirectedGraphTest); 35 defineReflectiveTests(DirectedGraphTest);
36 runReflectiveTests(MultipleMapIteratorTest); 36 defineReflectiveTests(MultipleMapIteratorTest);
37 runReflectiveTests(SingleMapIteratorTest); 37 defineReflectiveTests(SingleMapIteratorTest);
38 runReflectiveTests(TokenMapTest); 38 defineReflectiveTests(TokenMapTest);
39 runReflectiveTests(StringUtilitiesTest); 39 defineReflectiveTests(StringUtilitiesTest);
40 } 40 }
41 41
42 class AstCloneComparator extends AstComparator { 42 class AstCloneComparator extends AstComparator {
43 final bool expectTokensCopied; 43 final bool expectTokensCopied;
44 44
45 AstCloneComparator(this.expectTokensCopied); 45 AstCloneComparator(this.expectTokensCopied);
46 46
47 @override 47 @override
48 bool isEqualNodes(AstNode first, AstNode second) { 48 bool isEqualNodes(AstNode first, AstNode second) {
49 if (first != null && identical(first, second)) { 49 if (first != null && identical(first, second)) {
(...skipping 4330 matching lines...) Expand 10 before | Expand all | Expand 10 after
4380 } 4380 }
4381 4381
4382 void test_get_added() { 4382 void test_get_added() {
4383 TokenMap tokenMap = new TokenMap(); 4383 TokenMap tokenMap = new TokenMap();
4384 Token key = TokenFactory.tokenFromType(TokenType.AT); 4384 Token key = TokenFactory.tokenFromType(TokenType.AT);
4385 Token value = TokenFactory.tokenFromType(TokenType.AT); 4385 Token value = TokenFactory.tokenFromType(TokenType.AT);
4386 tokenMap.put(key, value); 4386 tokenMap.put(key, value);
4387 expect(tokenMap.get(key), same(value)); 4387 expect(tokenMap.get(key), same(value));
4388 } 4388 }
4389 } 4389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698