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

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

Issue 12803014: New Analysis Engine translation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 3
4 library engine.element_test; 4 library engine.element_test;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:io'; 7 import 'dart:io';
8 import 'package:analyzer_experimental/src/generated/java_core.dart'; 8 import 'package:analyzer_experimental/src/generated/java_core.dart';
9 import 'package:analyzer_experimental/src/generated/java_engine.dart'; 9 import 'package:analyzer_experimental/src/generated/java_engine.dart';
10 import 'package:analyzer_experimental/src/generated/java_engine_io.dart'; 10 import 'package:analyzer_experimental/src/generated/java_engine_io.dart';
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 JUnitTestCase.assertFalse(first == "a;b;d"); 43 JUnitTestCase.assertFalse(first == "a;b;d");
44 } 44 }
45 void test_equals_notEqual_sameLengths() { 45 void test_equals_notEqual_sameLengths() {
46 ElementLocationImpl first = new ElementLocationImpl.con2("a;b;c"); 46 ElementLocationImpl first = new ElementLocationImpl.con2("a;b;c");
47 ElementLocationImpl second = new ElementLocationImpl.con2("a;b;d"); 47 ElementLocationImpl second = new ElementLocationImpl.con2("a;b;d");
48 JUnitTestCase.assertFalse(first == second); 48 JUnitTestCase.assertFalse(first == second);
49 } 49 }
50 void test_getComponents() { 50 void test_getComponents() {
51 String encoding = "a;b;c"; 51 String encoding = "a;b;c";
52 ElementLocationImpl location = new ElementLocationImpl.con2(encoding); 52 ElementLocationImpl location = new ElementLocationImpl.con2(encoding);
53 List<String> components2 = location.components; 53 List<String> components3 = location.components;
54 EngineTestCase.assertLength(3, components2); 54 EngineTestCase.assertLength(3, components3);
55 JUnitTestCase.assertEquals("a", components2[0]); 55 JUnitTestCase.assertEquals("a", components3[0]);
56 JUnitTestCase.assertEquals("b", components2[1]); 56 JUnitTestCase.assertEquals("b", components3[1]);
57 JUnitTestCase.assertEquals("c", components2[2]); 57 JUnitTestCase.assertEquals("c", components3[2]);
58 } 58 }
59 void test_getEncoding() { 59 void test_getEncoding() {
60 String encoding = "a;b;c;;d"; 60 String encoding = "a;b;c;;d";
61 ElementLocationImpl location = new ElementLocationImpl.con2(encoding); 61 ElementLocationImpl location = new ElementLocationImpl.con2(encoding);
62 JUnitTestCase.assertEquals(encoding, location.encoding); 62 JUnitTestCase.assertEquals(encoding, location.encoding);
63 } 63 }
64 static dartSuite() { 64 static dartSuite() {
65 _ut.group('ElementLocationImplTest', () { 65 _ut.group('ElementLocationImplTest', () {
66 _ut.test('test_create_encoding', () { 66 _ut.test('test_create_encoding', () {
67 final __test = new ElementLocationImplTest(); 67 final __test = new ElementLocationImplTest();
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 void test_hashCode_element() { 1477 void test_hashCode_element() {
1478 FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.co n1(ASTFactory.identifier2("f"))); 1478 FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.co n1(ASTFactory.identifier2("f")));
1479 type.hashCode; 1479 type.hashCode;
1480 } 1480 }
1481 void test_hashCode_noElement() { 1481 void test_hashCode_noElement() {
1482 FunctionTypeImpl type = new FunctionTypeImpl.con1((null as ExecutableElement )); 1482 FunctionTypeImpl type = new FunctionTypeImpl.con1((null as ExecutableElement ));
1483 type.hashCode; 1483 type.hashCode;
1484 } 1484 }
1485 void test_isSubtypeOf_baseCase_classFunction() { 1485 void test_isSubtypeOf_baseCase_classFunction() {
1486 ClassElementImpl functionElement = ElementFactory.classElement2("Function", []); 1486 ClassElementImpl functionElement = ElementFactory.classElement2("Function", []);
1487 InterfaceTypeImpl functionType = new InterfaceTypeImpl_12(functionElement); 1487 InterfaceTypeImpl functionType = new InterfaceTypeImpl_14(functionElement);
1488 FunctionType f = ElementFactory.functionElement("f").type; 1488 FunctionType f = ElementFactory.functionElement("f").type;
1489 JUnitTestCase.assertTrue(f.isSubtypeOf(functionType)); 1489 JUnitTestCase.assertTrue(f.isSubtypeOf(functionType));
1490 } 1490 }
1491 void test_isSubtypeOf_baseCase_notFunctionType() { 1491 void test_isSubtypeOf_baseCase_notFunctionType() {
1492 FunctionType f = ElementFactory.functionElement("f").type; 1492 FunctionType f = ElementFactory.functionElement("f").type;
1493 InterfaceType t = ElementFactory.classElement2("C", []).type; 1493 InterfaceType t = ElementFactory.classElement2("C", []).type;
1494 JUnitTestCase.assertFalse(f.isSubtypeOf(t)); 1494 JUnitTestCase.assertFalse(f.isSubtypeOf(t));
1495 } 1495 }
1496 void test_isSubtypeOf_baseCase_null() { 1496 void test_isSubtypeOf_baseCase_null() {
1497 FunctionType f = ElementFactory.functionElement("f").type; 1497 FunctionType f = ElementFactory.functionElement("f").type;
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 final __test = new FunctionTypeImplTest(); 1889 final __test = new FunctionTypeImplTest();
1890 runJUnitTest(__test, __test.test_substitute2_equal); 1890 runJUnitTest(__test, __test.test_substitute2_equal);
1891 }); 1891 });
1892 _ut.test('test_substitute2_notEqual', () { 1892 _ut.test('test_substitute2_notEqual', () {
1893 final __test = new FunctionTypeImplTest(); 1893 final __test = new FunctionTypeImplTest();
1894 runJUnitTest(__test, __test.test_substitute2_notEqual); 1894 runJUnitTest(__test, __test.test_substitute2_notEqual);
1895 }); 1895 });
1896 }); 1896 });
1897 } 1897 }
1898 } 1898 }
1899 class InterfaceTypeImpl_12 extends InterfaceTypeImpl { 1899 class InterfaceTypeImpl_14 extends InterfaceTypeImpl {
1900 InterfaceTypeImpl_12(ClassElement arg0) : super.con1(arg0); 1900 InterfaceTypeImpl_14(ClassElement arg0) : super.con1(arg0);
1901 bool isDartCoreFunction() => true; 1901 bool isDartCoreFunction() => true;
1902 } 1902 }
1903 main() { 1903 main() {
1904 FunctionTypeImplTest.dartSuite(); 1904 FunctionTypeImplTest.dartSuite();
1905 InterfaceTypeImplTest.dartSuite(); 1905 InterfaceTypeImplTest.dartSuite();
1906 TypeVariableTypeImplTest.dartSuite(); 1906 TypeVariableTypeImplTest.dartSuite();
1907 ClassElementImplTest.dartSuite(); 1907 ClassElementImplTest.dartSuite();
1908 ElementLocationImplTest.dartSuite(); 1908 ElementLocationImplTest.dartSuite();
1909 ElementImplTest.dartSuite(); 1909 ElementImplTest.dartSuite();
1910 LibraryElementImplTest.dartSuite(); 1910 LibraryElementImplTest.dartSuite();
1911 } 1911 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/test/generated/ast_test.dart ('k') | pkg/analyzer_experimental/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698