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

Side by Side Diff: pkg/analyzer_experimental/test/generated/element_test.dart

Issue 16663003: Clean up analyzer_experimental after Annotation disambiguation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.element_test; 3 library engine.element_test;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'dart:io'; 5 import 'dart:io';
6 import 'package:analyzer_experimental/src/generated/java_core.dart'; 6 import 'package:analyzer_experimental/src/generated/java_core.dart';
7 import 'package:analyzer_experimental/src/generated/java_engine.dart'; 7 import 'package:analyzer_experimental/src/generated/java_engine.dart';
8 import 'package:analyzer_experimental/src/generated/java_engine_io.dart'; 8 import 'package:analyzer_experimental/src/generated/java_engine_io.dart';
9 import 'package:analyzer_experimental/src/generated/java_junit.dart'; 9 import 'package:analyzer_experimental/src/generated/java_junit.dart';
10 import 'package:analyzer_experimental/src/generated/source_io.dart'; 10 import 'package:analyzer_experimental/src/generated/source_io.dart';
11 import 'package:analyzer_experimental/src/generated/error.dart'; 11 import 'package:analyzer_experimental/src/generated/error.dart';
12 import 'package:analyzer_experimental/src/generated/scanner.dart'; 12 import 'package:analyzer_experimental/src/generated/scanner.dart';
13 import 'package:analyzer_experimental/src/generated/utilities_dart.dart'; 13 import 'package:analyzer_experimental/src/generated/utilities_dart.dart';
14 import 'package:analyzer_experimental/src/generated/ast.dart' hide Annotation; 14 import 'package:analyzer_experimental/src/generated/ast.dart';
15 import 'package:analyzer_experimental/src/generated/element.dart' hide Annotatio n; 15 import 'package:analyzer_experimental/src/generated/element.dart';
16 import 'package:analyzer_experimental/src/generated/engine.dart' show AnalysisCo ntext, AnalysisContextImpl; 16 import 'package:analyzer_experimental/src/generated/engine.dart' show AnalysisCo ntext, AnalysisContextImpl;
17 import 'package:unittest/unittest.dart' as _ut; 17 import 'package:unittest/unittest.dart' as _ut;
18 import 'test_support.dart'; 18 import 'test_support.dart';
19 import 'scanner_test.dart' show TokenFactory; 19 import 'scanner_test.dart' show TokenFactory;
20 import 'ast_test.dart' show ASTFactory; 20 import 'ast_test.dart' show ASTFactory;
21 import 'resolver_test.dart' show TestTypeProvider; 21 import 'resolver_test.dart' show TestTypeProvider;
22 class ElementLocationImplTest extends EngineTestCase { 22 class ElementLocationImplTest extends EngineTestCase {
23 void test_create_encoding() { 23 void test_create_encoding() {
24 String encoding = "a;b;c"; 24 String encoding = "a;b;c";
25 ElementLocationImpl location = new ElementLocationImpl.con2(encoding); 25 ElementLocationImpl location = new ElementLocationImpl.con2(encoding);
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 JUnitTestCase.assertTrue(typeB.isSubtypeOf(typeA)); 786 JUnitTestCase.assertTrue(typeB.isSubtypeOf(typeA));
787 JUnitTestCase.assertFalse(typeA.isSubtypeOf(typeB)); 787 JUnitTestCase.assertFalse(typeA.isSubtypeOf(typeB));
788 } 788 }
789 void test_isSubtypeOf_dynamic() { 789 void test_isSubtypeOf_dynamic() {
790 ClassElement classA = ElementFactory.classElement2("A", []); 790 ClassElement classA = ElementFactory.classElement2("A", []);
791 InterfaceType typeA = classA.type; 791 InterfaceType typeA = classA.type;
792 Type2 dynamicType = DynamicTypeImpl.instance; 792 Type2 dynamicType = DynamicTypeImpl.instance;
793 JUnitTestCase.assertFalse(dynamicType.isSubtypeOf(typeA)); 793 JUnitTestCase.assertFalse(dynamicType.isSubtypeOf(typeA));
794 JUnitTestCase.assertTrue(typeA.isSubtypeOf(dynamicType)); 794 JUnitTestCase.assertTrue(typeA.isSubtypeOf(dynamicType));
795 } 795 }
796 void test_isSubtypeOf_function() {
797 InterfaceType stringType = _typeProvider.stringType;
798 ClassElementImpl classA = ElementFactory.classElement2("A", []);
799 classA.methods = <MethodElement> [ElementFactory.methodElement("call", VoidT ypeImpl.instance, [stringType])];
800 FunctionType functionType = ElementFactory.functionElement5("f", <ClassEleme nt> [stringType.element]).type;
801 JUnitTestCase.assertTrue(classA.type.isSubtypeOf(functionType));
802 }
796 void test_isSubtypeOf_interface() { 803 void test_isSubtypeOf_interface() {
797 ClassElement classA = ElementFactory.classElement2("A", []); 804 ClassElement classA = ElementFactory.classElement2("A", []);
798 ClassElement classB = ElementFactory.classElement("B", classA.type, []); 805 ClassElement classB = ElementFactory.classElement("B", classA.type, []);
799 ClassElementImpl classC = ElementFactory.classElement2("C", []); 806 ClassElementImpl classC = ElementFactory.classElement2("C", []);
800 InterfaceType typeObject = classA.supertype; 807 InterfaceType typeObject = classA.supertype;
801 InterfaceType typeA = classA.type; 808 InterfaceType typeA = classA.type;
802 InterfaceType typeB = classB.type; 809 InterfaceType typeB = classB.type;
803 InterfaceType typeC = classC.type; 810 InterfaceType typeC = classC.type;
804 classC.interfaces = <InterfaceType> [typeB]; 811 classC.interfaces = <InterfaceType> [typeB];
805 JUnitTestCase.assertTrue(typeC.isSubtypeOf(typeB)); 812 JUnitTestCase.assertTrue(typeC.isSubtypeOf(typeB));
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 runJUnitTest(__test, __test.test_isMoreSpecificThan_transitive_superclas s); 1368 runJUnitTest(__test, __test.test_isMoreSpecificThan_transitive_superclas s);
1362 }); 1369 });
1363 _ut.test('test_isSubtypeOf_directSubtype', () { 1370 _ut.test('test_isSubtypeOf_directSubtype', () {
1364 final __test = new InterfaceTypeImplTest(); 1371 final __test = new InterfaceTypeImplTest();
1365 runJUnitTest(__test, __test.test_isSubtypeOf_directSubtype); 1372 runJUnitTest(__test, __test.test_isSubtypeOf_directSubtype);
1366 }); 1373 });
1367 _ut.test('test_isSubtypeOf_dynamic', () { 1374 _ut.test('test_isSubtypeOf_dynamic', () {
1368 final __test = new InterfaceTypeImplTest(); 1375 final __test = new InterfaceTypeImplTest();
1369 runJUnitTest(__test, __test.test_isSubtypeOf_dynamic); 1376 runJUnitTest(__test, __test.test_isSubtypeOf_dynamic);
1370 }); 1377 });
1378 _ut.test('test_isSubtypeOf_function', () {
1379 final __test = new InterfaceTypeImplTest();
1380 runJUnitTest(__test, __test.test_isSubtypeOf_function);
1381 });
1371 _ut.test('test_isSubtypeOf_interface', () { 1382 _ut.test('test_isSubtypeOf_interface', () {
1372 final __test = new InterfaceTypeImplTest(); 1383 final __test = new InterfaceTypeImplTest();
1373 runJUnitTest(__test, __test.test_isSubtypeOf_interface); 1384 runJUnitTest(__test, __test.test_isSubtypeOf_interface);
1374 }); 1385 });
1375 _ut.test('test_isSubtypeOf_mixins', () { 1386 _ut.test('test_isSubtypeOf_mixins', () {
1376 final __test = new InterfaceTypeImplTest(); 1387 final __test = new InterfaceTypeImplTest();
1377 runJUnitTest(__test, __test.test_isSubtypeOf_mixins); 1388 runJUnitTest(__test, __test.test_isSubtypeOf_mixins);
1378 }); 1389 });
1379 _ut.test('test_isSubtypeOf_object', () { 1390 _ut.test('test_isSubtypeOf_object', () {
1380 final __test = new InterfaceTypeImplTest(); 1391 final __test = new InterfaceTypeImplTest();
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2671 main() { 2682 main() {
2672 ElementKindTest.dartSuite(); 2683 ElementKindTest.dartSuite();
2673 FunctionTypeImplTest.dartSuite(); 2684 FunctionTypeImplTest.dartSuite();
2674 InterfaceTypeImplTest.dartSuite(); 2685 InterfaceTypeImplTest.dartSuite();
2675 TypeVariableTypeImplTest.dartSuite(); 2686 TypeVariableTypeImplTest.dartSuite();
2676 ClassElementImplTest.dartSuite(); 2687 ClassElementImplTest.dartSuite();
2677 ElementLocationImplTest.dartSuite(); 2688 ElementLocationImplTest.dartSuite();
2678 ElementImplTest.dartSuite(); 2689 ElementImplTest.dartSuite();
2679 LibraryElementImplTest.dartSuite(); 2690 LibraryElementImplTest.dartSuite();
2680 } 2691 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/resolver.dart ('k') | pkg/analyzer_experimental/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698