| OLD | NEW |
| 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.resolver_test; | 3 library engine.resolver_test; |
| 4 import 'package:analyzer_experimental/src/generated/java_core.dart'; | 4 import 'package:analyzer_experimental/src/generated/java_core.dart'; |
| 5 import 'package:analyzer_experimental/src/generated/java_junit.dart'; | 5 import 'package:analyzer_experimental/src/generated/java_junit.dart'; |
| 6 import 'package:analyzer_experimental/src/generated/source_io.dart'; | 6 import 'package:analyzer_experimental/src/generated/source_io.dart'; |
| 7 import 'package:analyzer_experimental/src/generated/error.dart'; | 7 import 'package:analyzer_experimental/src/generated/error.dart'; |
| 8 import 'package:analyzer_experimental/src/generated/scanner.dart'; | 8 import 'package:analyzer_experimental/src/generated/scanner.dart'; |
| 9 import 'package:analyzer_experimental/src/generated/ast.dart'; | 9 import 'package:analyzer_experimental/src/generated/ast.dart'; |
| 10 import 'package:analyzer_experimental/src/generated/parser.dart' show ParserErro
rCode; | 10 import 'package:analyzer_experimental/src/generated/parser.dart' show ParserErro
rCode; |
| (...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 resolve(source); | 1592 resolve(source); |
| 1593 assertNoErrors(source); | 1593 assertNoErrors(source); |
| 1594 verify([source]); | 1594 verify([source]); |
| 1595 } | 1595 } |
| 1596 void test_functionTypeAlias_scope_signature() { | 1596 void test_functionTypeAlias_scope_signature() { |
| 1597 Source source = addSource(EngineTestCase.createSource(["const app = 0;", "ty
pedef int f(@app int app);"])); | 1597 Source source = addSource(EngineTestCase.createSource(["const app = 0;", "ty
pedef int f(@app int app);"])); |
| 1598 resolve(source); | 1598 resolve(source); |
| 1599 assertNoErrors(source); | 1599 assertNoErrors(source); |
| 1600 verify([source]); | 1600 verify([source]); |
| 1601 } | 1601 } |
| 1602 void test_functionWithoutCall() { |
| 1603 Source source = addSource(EngineTestCase.createSource([ |
| 1604 "abstract class A implements Function {", |
| 1605 "}", |
| 1606 "class B implements A {", |
| 1607 " void call() {}", |
| 1608 "}", |
| 1609 "class C extends A {", |
| 1610 " void call() {}", |
| 1611 "}", |
| 1612 "class D extends C {", |
| 1613 "}"])); |
| 1614 resolve(source); |
| 1615 assertNoErrors(source); |
| 1616 verify([source]); |
| 1617 } |
| 1602 void test_implicitThisReferenceInInitializer_constructorName() { | 1618 void test_implicitThisReferenceInInitializer_constructorName() { |
| 1603 Source source = addSource(EngineTestCase.createSource([ | 1619 Source source = addSource(EngineTestCase.createSource([ |
| 1604 "class A {", | 1620 "class A {", |
| 1605 " A.named() {}", | 1621 " A.named() {}", |
| 1606 "}", | 1622 "}", |
| 1607 "class B {", | 1623 "class B {", |
| 1608 " var v;", | 1624 " var v;", |
| 1609 " B() : v = new A.named();", | 1625 " B() : v = new A.named();", |
| 1610 "}"])); | 1626 "}"])); |
| 1611 resolve(source); | 1627 resolve(source); |
| (...skipping 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3739 runJUnitTest(__test, __test.test_functionDeclaration_scope_signature); | 3755 runJUnitTest(__test, __test.test_functionDeclaration_scope_signature); |
| 3740 }); | 3756 }); |
| 3741 _ut.test('test_functionTypeAlias_scope_returnType', () { | 3757 _ut.test('test_functionTypeAlias_scope_returnType', () { |
| 3742 final __test = new NonErrorResolverTest(); | 3758 final __test = new NonErrorResolverTest(); |
| 3743 runJUnitTest(__test, __test.test_functionTypeAlias_scope_returnType); | 3759 runJUnitTest(__test, __test.test_functionTypeAlias_scope_returnType); |
| 3744 }); | 3760 }); |
| 3745 _ut.test('test_functionTypeAlias_scope_signature', () { | 3761 _ut.test('test_functionTypeAlias_scope_signature', () { |
| 3746 final __test = new NonErrorResolverTest(); | 3762 final __test = new NonErrorResolverTest(); |
| 3747 runJUnitTest(__test, __test.test_functionTypeAlias_scope_signature); | 3763 runJUnitTest(__test, __test.test_functionTypeAlias_scope_signature); |
| 3748 }); | 3764 }); |
| 3765 _ut.test('test_functionWithoutCall', () { |
| 3766 final __test = new NonErrorResolverTest(); |
| 3767 runJUnitTest(__test, __test.test_functionWithoutCall); |
| 3768 }); |
| 3749 _ut.test('test_implicitThisReferenceInInitializer_constructorName', () { | 3769 _ut.test('test_implicitThisReferenceInInitializer_constructorName', () { |
| 3750 final __test = new NonErrorResolverTest(); | 3770 final __test = new NonErrorResolverTest(); |
| 3751 runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_cons
tructorName); | 3771 runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_cons
tructorName); |
| 3752 }); | 3772 }); |
| 3753 _ut.test('test_implicitThisReferenceInInitializer_prefixedIdentifier', ()
{ | 3773 _ut.test('test_implicitThisReferenceInInitializer_prefixedIdentifier', ()
{ |
| 3754 final __test = new NonErrorResolverTest(); | 3774 final __test = new NonErrorResolverTest(); |
| 3755 runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_pref
ixedIdentifier); | 3775 runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_pref
ixedIdentifier); |
| 3756 }); | 3776 }); |
| 3757 _ut.test('test_implicitThisReferenceInInitializer_qualifiedMethodInvocatio
n', () { | 3777 _ut.test('test_implicitThisReferenceInInitializer_qualifiedMethodInvocatio
n', () { |
| 3758 final __test = new NonErrorResolverTest(); | 3778 final __test = new NonErrorResolverTest(); |
| (...skipping 10090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13849 resolve(source); | 13869 resolve(source); |
| 13850 assertErrors(source, [StaticWarningCode.FINAL_NOT_INITIALIZED]); | 13870 assertErrors(source, [StaticWarningCode.FINAL_NOT_INITIALIZED]); |
| 13851 verify([source]); | 13871 verify([source]); |
| 13852 } | 13872 } |
| 13853 void test_finalNotInitialized_local_final() { | 13873 void test_finalNotInitialized_local_final() { |
| 13854 Source source = addSource(EngineTestCase.createSource(["f() {", " final int
x;", "}"])); | 13874 Source source = addSource(EngineTestCase.createSource(["f() {", " final int
x;", "}"])); |
| 13855 resolve(source); | 13875 resolve(source); |
| 13856 assertErrors(source, [StaticWarningCode.FINAL_NOT_INITIALIZED]); | 13876 assertErrors(source, [StaticWarningCode.FINAL_NOT_INITIALIZED]); |
| 13857 verify([source]); | 13877 verify([source]); |
| 13858 } | 13878 } |
| 13879 void test_functionWithoutCall_direct() { |
| 13880 Source source = addSource(EngineTestCase.createSource(["class A implements F
unction {", "}"])); |
| 13881 resolve(source); |
| 13882 assertErrors(source, [StaticWarningCode.FUNCTION_WITHOUT_CALL]); |
| 13883 verify([source]); |
| 13884 } |
| 13885 void test_functionWithoutCall_indirect_extends() { |
| 13886 Source source = addSource(EngineTestCase.createSource([ |
| 13887 "abstract class A implements Function {", |
| 13888 "}", |
| 13889 "class B extends A {", |
| 13890 "}"])); |
| 13891 resolve(source); |
| 13892 assertErrors(source, [StaticWarningCode.FUNCTION_WITHOUT_CALL]); |
| 13893 verify([source]); |
| 13894 } |
| 13895 void test_functionWithoutCall_indirect_implements() { |
| 13896 Source source = addSource(EngineTestCase.createSource([ |
| 13897 "abstract class A implements Function {", |
| 13898 "}", |
| 13899 "class B implements A {", |
| 13900 "}"])); |
| 13901 resolve(source); |
| 13902 assertErrors(source, [StaticWarningCode.FUNCTION_WITHOUT_CALL]); |
| 13903 verify([source]); |
| 13904 } |
| 13859 void test_importDuplicatedLibraryName() { | 13905 void test_importDuplicatedLibraryName() { |
| 13860 Source source = addSource(EngineTestCase.createSource([ | 13906 Source source = addSource(EngineTestCase.createSource([ |
| 13861 "library test;", | 13907 "library test;", |
| 13862 "import 'lib1.dart';", | 13908 "import 'lib1.dart';", |
| 13863 "import 'lib2.dart';"])); | 13909 "import 'lib2.dart';"])); |
| 13864 addSource2("/lib1.dart", "library lib;"); | 13910 addSource2("/lib1.dart", "library lib;"); |
| 13865 addSource2("/lib2.dart", "library lib;"); | 13911 addSource2("/lib2.dart", "library lib;"); |
| 13866 resolve(source); | 13912 resolve(source); |
| 13867 assertErrors(source, [ | 13913 assertErrors(source, [ |
| 13868 StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAME, | 13914 StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAME, |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15162 runJUnitTest(__test, __test.test_finalNotInitialized_instanceField_final
_static); | 15208 runJUnitTest(__test, __test.test_finalNotInitialized_instanceField_final
_static); |
| 15163 }); | 15209 }); |
| 15164 _ut.test('test_finalNotInitialized_library_final', () { | 15210 _ut.test('test_finalNotInitialized_library_final', () { |
| 15165 final __test = new StaticWarningCodeTest(); | 15211 final __test = new StaticWarningCodeTest(); |
| 15166 runJUnitTest(__test, __test.test_finalNotInitialized_library_final); | 15212 runJUnitTest(__test, __test.test_finalNotInitialized_library_final); |
| 15167 }); | 15213 }); |
| 15168 _ut.test('test_finalNotInitialized_local_final', () { | 15214 _ut.test('test_finalNotInitialized_local_final', () { |
| 15169 final __test = new StaticWarningCodeTest(); | 15215 final __test = new StaticWarningCodeTest(); |
| 15170 runJUnitTest(__test, __test.test_finalNotInitialized_local_final); | 15216 runJUnitTest(__test, __test.test_finalNotInitialized_local_final); |
| 15171 }); | 15217 }); |
| 15218 _ut.test('test_functionWithoutCall_direct', () { |
| 15219 final __test = new StaticWarningCodeTest(); |
| 15220 runJUnitTest(__test, __test.test_functionWithoutCall_direct); |
| 15221 }); |
| 15222 _ut.test('test_functionWithoutCall_indirect_extends', () { |
| 15223 final __test = new StaticWarningCodeTest(); |
| 15224 runJUnitTest(__test, __test.test_functionWithoutCall_indirect_extends); |
| 15225 }); |
| 15226 _ut.test('test_functionWithoutCall_indirect_implements', () { |
| 15227 final __test = new StaticWarningCodeTest(); |
| 15228 runJUnitTest(__test, __test.test_functionWithoutCall_indirect_implements
); |
| 15229 }); |
| 15172 _ut.test('test_importDuplicatedLibraryName', () { | 15230 _ut.test('test_importDuplicatedLibraryName', () { |
| 15173 final __test = new StaticWarningCodeTest(); | 15231 final __test = new StaticWarningCodeTest(); |
| 15174 runJUnitTest(__test, __test.test_importDuplicatedLibraryName); | 15232 runJUnitTest(__test, __test.test_importDuplicatedLibraryName); |
| 15175 }); | 15233 }); |
| 15176 _ut.test('test_inconsistentMethodInheritanceGetterAndMethod', () { | 15234 _ut.test('test_inconsistentMethodInheritanceGetterAndMethod', () { |
| 15177 final __test = new StaticWarningCodeTest(); | 15235 final __test = new StaticWarningCodeTest(); |
| 15178 runJUnitTest(__test, __test.test_inconsistentMethodInheritanceGetterAndM
ethod); | 15236 runJUnitTest(__test, __test.test_inconsistentMethodInheritanceGetterAndM
ethod); |
| 15179 }); | 15237 }); |
| 15180 _ut.test('test_instanceMethodNameCollidesWithSuperclassStatic_field', () { | 15238 _ut.test('test_instanceMethodNameCollidesWithSuperclassStatic_field', () { |
| 15181 final __test = new StaticWarningCodeTest(); | 15239 final __test = new StaticWarningCodeTest(); |
| (...skipping 4200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19382 // HintCodeTest.dartSuite(); | 19440 // HintCodeTest.dartSuite(); |
| 19383 // MemberMapTest.dartSuite(); | 19441 // MemberMapTest.dartSuite(); |
| 19384 // NonHintCodeTest.dartSuite(); | 19442 // NonHintCodeTest.dartSuite(); |
| 19385 // NonErrorResolverTest.dartSuite(); | 19443 // NonErrorResolverTest.dartSuite(); |
| 19386 // SimpleResolverTest.dartSuite(); | 19444 // SimpleResolverTest.dartSuite(); |
| 19387 // StaticTypeWarningCodeTest.dartSuite(); | 19445 // StaticTypeWarningCodeTest.dartSuite(); |
| 19388 // StaticWarningCodeTest.dartSuite(); | 19446 // StaticWarningCodeTest.dartSuite(); |
| 19389 // StrictModeTest.dartSuite(); | 19447 // StrictModeTest.dartSuite(); |
| 19390 // TypePropagationTest.dartSuite(); | 19448 // TypePropagationTest.dartSuite(); |
| 19391 } | 19449 } |
| OLD | NEW |