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

Side by Side Diff: pkg/analyzer/test/src/dart/ast/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.src.dart.ast.utilities_test; 5 library analyzer.test.src.dart.ast.utilities_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/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
11 import 'package:analyzer/src/dart/ast/utilities.dart'; 11 import 'package:analyzer/src/dart/ast/utilities.dart';
12 import 'package:analyzer/src/dart/element/element.dart'; 12 import 'package:analyzer/src/dart/element/element.dart';
13 import 'package:analyzer/src/generated/java_core.dart'; 13 import 'package:analyzer/src/generated/java_core.dart';
14 import 'package:analyzer/src/generated/java_engine.dart' show Predicate; 14 import 'package:analyzer/src/generated/java_engine.dart' show Predicate;
15 import 'package:analyzer/src/generated/java_engine.dart'; 15 import 'package:analyzer/src/generated/java_engine.dart';
16 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 16 import 'package:analyzer/src/generated/testing/ast_factory.dart';
17 import 'package:analyzer/src/generated/testing/element_factory.dart'; 17 import 'package:analyzer/src/generated/testing/element_factory.dart';
18 import 'package:analyzer/src/generated/testing/token_factory.dart'; 18 import 'package:analyzer/src/generated/testing/token_factory.dart';
19 import 'package:test/test.dart';
19 import 'package:test_reflective_loader/test_reflective_loader.dart'; 20 import 'package:test_reflective_loader/test_reflective_loader.dart';
20 import 'package:unittest/unittest.dart';
21 21
22 import '../../../generated/parser_test.dart' show ParserTestCase; 22 import '../../../generated/parser_test.dart' show ParserTestCase;
23 import '../../../generated/test_support.dart'; 23 import '../../../generated/test_support.dart';
24 import '../../../utils.dart'; 24 import '../../../utils.dart';
25 25
26 main() { 26 main() {
27 initializeTestEnvironment(); 27 initializeTestEnvironment();
28 defineReflectiveTests(ConstantEvaluatorTest); 28 defineReflectiveSuite(() {
29 defineReflectiveTests(NodeLocatorTest); 29 defineReflectiveTests(ConstantEvaluatorTest);
30 defineReflectiveTests(NodeLocator2Test); 30 defineReflectiveTests(NodeLocatorTest);
31 defineReflectiveTests(ResolutionCopierTest); 31 defineReflectiveTests(NodeLocator2Test);
32 defineReflectiveTests(ToSourceVisitorTest); 32 defineReflectiveTests(ResolutionCopierTest);
33 defineReflectiveTests(ToSourceVisitorTest);
34 });
33 } 35 }
34 36
35 @reflectiveTest 37 @reflectiveTest
36 class ConstantEvaluatorTest extends ParserTestCase { 38 class ConstantEvaluatorTest extends ParserTestCase {
37 void fail_constructor() { 39 void fail_constructor() {
38 Object value = _getConstantValue("?"); 40 Object value = _getConstantValue("?");
39 expect(value, null); 41 expect(value, null);
40 } 42 }
41 43
42 void fail_identifier_class() { 44 void fail_identifier_class() {
(...skipping 3296 matching lines...) Expand 10 before | Expand all | Expand 10 after
3339 * @param expectedSource the source string that the visitor is expected to pro duce 3341 * @param expectedSource the source string that the visitor is expected to pro duce
3340 * @param node the AST node being visited to produce the actual source 3342 * @param node the AST node being visited to produce the actual source
3341 * @throws AFE if the visitor does not produce the expected source for the giv en node 3343 * @throws AFE if the visitor does not produce the expected source for the giv en node
3342 */ 3344 */
3343 void _assertSource(String expectedSource, AstNode node) { 3345 void _assertSource(String expectedSource, AstNode node) {
3344 PrintStringWriter writer = new PrintStringWriter(); 3346 PrintStringWriter writer = new PrintStringWriter();
3345 node.accept(new ToSourceVisitor(writer)); 3347 node.accept(new ToSourceVisitor(writer));
3346 expect(writer.toString(), expectedSource); 3348 expect(writer.toString(), expectedSource);
3347 } 3349 }
3348 } 3350 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698