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

Side by Side Diff: pkg/analyzer/test/generated/type_system_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // Tests related to the [TypeSystem] class. 5 // Tests related to the [TypeSystem] class.
6 6
7 library analyzer.test.generated.type_system_test; 7 library analyzer.test.generated.type_system_test;
8 8
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/element/element.dart'; 11 import 'package:analyzer/src/dart/element/element.dart';
12 import 'package:analyzer/src/dart/element/type.dart'; 12 import 'package:analyzer/src/dart/element/type.dart';
13 import 'package:analyzer/src/generated/engine.dart'; 13 import 'package:analyzer/src/generated/engine.dart';
14 import 'package:analyzer/src/generated/resolver.dart'; 14 import 'package:analyzer/src/generated/resolver.dart';
15 import 'package:analyzer/src/generated/testing/element_factory.dart'; 15 import 'package:analyzer/src/generated/testing/element_factory.dart';
16 import 'package:analyzer/src/generated/testing/test_type_provider.dart'; 16 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
17 import 'package:test_reflective_loader/test_reflective_loader.dart';
17 import 'package:unittest/unittest.dart'; 18 import 'package:unittest/unittest.dart';
18 19
19 import '../reflective_tests.dart';
20 import '../utils.dart'; 20 import '../utils.dart';
21 import 'analysis_context_factory.dart'; 21 import 'analysis_context_factory.dart';
22 22
23 main() { 23 main() {
24 initializeTestEnvironment(); 24 initializeTestEnvironment();
25 runReflectiveTests(StrongAssignabilityTest); 25 defineReflectiveTests(StrongAssignabilityTest);
26 runReflectiveTests(StrongSubtypingTest); 26 defineReflectiveTests(StrongSubtypingTest);
27 runReflectiveTests(StrongGenericFunctionInferenceTest); 27 defineReflectiveTests(StrongGenericFunctionInferenceTest);
28 runReflectiveTests(LeastUpperBoundTest); 28 defineReflectiveTests(LeastUpperBoundTest);
29 runReflectiveTests(StrongLeastUpperBoundTest); 29 defineReflectiveTests(StrongLeastUpperBoundTest);
30 runReflectiveTests(StrongGreatestLowerBoundTest); 30 defineReflectiveTests(StrongGreatestLowerBoundTest);
31 } 31 }
32 32
33 /** 33 /**
34 * Base class for testing LUB and GLB in spec and strong mode. 34 * Base class for testing LUB and GLB in spec and strong mode.
35 */ 35 */
36 abstract class BoundTestBase { 36 abstract class BoundTestBase {
37 TypeProvider typeProvider; 37 TypeProvider typeProvider;
38 TypeSystem typeSystem; 38 TypeSystem typeSystem;
39 FunctionType simpleFunctionType; 39 FunctionType simpleFunctionType;
40 40
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 if (types != null) { 1886 if (types != null) {
1887 f.typeParameters = 1887 f.typeParameters =
1888 new List<TypeParameterElement>.from(types.map((t) => t.element)); 1888 new List<TypeParameterElement>.from(types.map((t) => t.element));
1889 } 1889 }
1890 return f.type = new FunctionTypeImpl(f); 1890 return f.type = new FunctionTypeImpl(f);
1891 } 1891 }
1892 1892
1893 static TypeParameterType variable(String name, {DartType bound}) => 1893 static TypeParameterType variable(String name, {DartType bound}) =>
1894 ElementFactory.typeParameterWithType(name, bound).type; 1894 ElementFactory.typeParameterWithType(name, bound).type;
1895 } 1895 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698