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

Side by Side Diff: pkg/analyzer/test/generated/utilities_test.dart

Issue 2391423003: Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0. (Closed)
Patch Set: Created 4 years, 2 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_engine.dart'; 15 import 'package:analyzer/src/generated/java_engine.dart';
16 import 'package:analyzer/src/generated/parser.dart'; 16 import 'package:analyzer/src/generated/parser.dart';
17 import 'package:analyzer/src/generated/source.dart'; 17 import 'package:analyzer/src/generated/source.dart';
18 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 18 import 'package:analyzer/src/generated/testing/ast_factory.dart';
19 import 'package:analyzer/src/generated/testing/token_factory.dart'; 19 import 'package:analyzer/src/generated/testing/token_factory.dart';
20 import 'package:analyzer/src/generated/utilities_collection.dart'; 20 import 'package:analyzer/src/generated/utilities_collection.dart';
21 import 'package:test/test.dart';
21 import 'package:test_reflective_loader/test_reflective_loader.dart'; 22 import 'package:test_reflective_loader/test_reflective_loader.dart';
22 import 'package:unittest/unittest.dart';
23 23
24 import '../utils.dart'; 24 import '../utils.dart';
25 import 'test_support.dart'; 25 import 'test_support.dart';
26 26
27 main() { 27 main() {
28 initializeTestEnvironment(); 28 initializeTestEnvironment();
29 defineReflectiveTests(AstClonerTest); 29 defineReflectiveSuite(() {
30 defineReflectiveTests(NodeReplacerTest); 30 defineReflectiveTests(AstClonerTest);
31 defineReflectiveTests(LineInfoTest); 31 defineReflectiveTests(NodeReplacerTest);
32 defineReflectiveTests(SourceRangeTest); 32 defineReflectiveTests(LineInfoTest);
33 defineReflectiveTests(BooleanArrayTest); 33 defineReflectiveTests(SourceRangeTest);
34 defineReflectiveTests(DirectedGraphTest); 34 defineReflectiveTests(BooleanArrayTest);
35 defineReflectiveTests(MultipleMapIteratorTest); 35 defineReflectiveTests(DirectedGraphTest);
36 defineReflectiveTests(SingleMapIteratorTest); 36 defineReflectiveTests(MultipleMapIteratorTest);
37 defineReflectiveTests(TokenMapTest); 37 defineReflectiveTests(SingleMapIteratorTest);
38 defineReflectiveTests(StringUtilitiesTest); 38 defineReflectiveTests(TokenMapTest);
39 defineReflectiveTests(StringUtilitiesTest);
40 });
39 } 41 }
40 42
41 class AstCloneComparator extends AstComparator { 43 class AstCloneComparator extends AstComparator {
42 final bool expectTokensCopied; 44 final bool expectTokensCopied;
43 45
44 AstCloneComparator(this.expectTokensCopied); 46 AstCloneComparator(this.expectTokensCopied);
45 47
46 @override 48 @override
47 bool isEqualNodes(AstNode first, AstNode second) { 49 bool isEqualNodes(AstNode first, AstNode second) {
48 if (first != null && identical(first, second)) { 50 if (first != null && identical(first, second)) {
(...skipping 4284 matching lines...) Expand 10 before | Expand all | Expand 10 after
4333 } 4335 }
4334 4336
4335 void test_get_added() { 4337 void test_get_added() {
4336 TokenMap tokenMap = new TokenMap(); 4338 TokenMap tokenMap = new TokenMap();
4337 Token key = TokenFactory.tokenFromType(TokenType.AT); 4339 Token key = TokenFactory.tokenFromType(TokenType.AT);
4338 Token value = TokenFactory.tokenFromType(TokenType.AT); 4340 Token value = TokenFactory.tokenFromType(TokenType.AT);
4339 tokenMap.put(key, value); 4341 tokenMap.put(key, value);
4340 expect(tokenMap.get(key), same(value)); 4342 expect(tokenMap.get(key), same(value));
4341 } 4343 }
4342 } 4344 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698