| 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 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'package:analyzer_experimental/src/generated/java_core.dart'; | 5 import 'package:analyzer_experimental/src/generated/java_core.dart'; |
| 6 import 'package:analyzer_experimental/src/generated/java_engine.dart'; | 6 import 'package:analyzer_experimental/src/generated/java_engine.dart'; |
| 7 import 'package:analyzer_experimental/src/generated/java_junit.dart'; | 7 import 'package:analyzer_experimental/src/generated/java_junit.dart'; |
| 8 import 'package:analyzer_experimental/src/generated/source_io.dart'; | 8 import 'package:analyzer_experimental/src/generated/source_io.dart'; |
| 9 import 'package:analyzer_experimental/src/generated/error.dart'; | 9 import 'package:analyzer_experimental/src/generated/error.dart'; |
| 10 import 'package:analyzer_experimental/src/generated/scanner.dart'; | 10 import 'package:analyzer_experimental/src/generated/scanner.dart'; |
| (...skipping 7979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7990 assertErrors([StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]); | 7990 assertErrors([StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]); |
| 7991 verify([source]); | 7991 verify([source]); |
| 7992 } | 7992 } |
| 7993 void test_newWithAbstractClass() { | 7993 void test_newWithAbstractClass() { |
| 7994 Source source = addSource(EngineTestCase.createSource(["abstract class A {}"
, "void f() {", " A a = new A();", "}"])); | 7994 Source source = addSource(EngineTestCase.createSource(["abstract class A {}"
, "void f() {", " A a = new A();", "}"])); |
| 7995 resolve(source); | 7995 resolve(source); |
| 7996 assertErrors([StaticWarningCode.NEW_WITH_ABSTRACT_CLASS]); | 7996 assertErrors([StaticWarningCode.NEW_WITH_ABSTRACT_CLASS]); |
| 7997 verify([source]); | 7997 verify([source]); |
| 7998 } | 7998 } |
| 7999 void test_newWithNonType() { | 7999 void test_newWithNonType() { |
| 8000 Source source = addSource(EngineTestCase.createSource(["var A = 0;", "void f
() {", " A a = new A();", "}"])); | 8000 Source source = addSource(EngineTestCase.createSource(["var A = 0;", "void f
() {", " var a = new A();", "}"])); |
| 8001 resolve(source); | 8001 resolve(source); |
| 8002 assertErrors([StaticWarningCode.NEW_WITH_NON_TYPE]); | 8002 assertErrors([StaticWarningCode.NEW_WITH_NON_TYPE]); |
| 8003 verify([source]); | 8003 verify([source]); |
| 8004 } | 8004 } |
| 8005 void test_newWithUndefinedConstructor() { | 8005 void test_newWithUndefinedConstructor() { |
| 8006 Source source = addSource(EngineTestCase.createSource(["class A {", " A() {
}", "}", "f() {", " new A.name();", "}"])); | 8006 Source source = addSource(EngineTestCase.createSource(["class A {", " A() {
}", "}", "f() {", " new A.name();", "}"])); |
| 8007 resolve(source); | 8007 resolve(source); |
| 8008 assertErrors([StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR]); | 8008 assertErrors([StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR]); |
| 8009 } | 8009 } |
| 8010 void test_newWithUndefinedConstructorDefault() { | 8010 void test_newWithUndefinedConstructorDefault() { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8102 resolve(source); | 8102 resolve(source); |
| 8103 assertErrors([StaticWarningCode.NON_VOID_RETURN_FOR_SETTER]); | 8103 assertErrors([StaticWarningCode.NON_VOID_RETURN_FOR_SETTER]); |
| 8104 verify([source]); | 8104 verify([source]); |
| 8105 } | 8105 } |
| 8106 void test_nonVoidReturnForSetter_method() { | 8106 void test_nonVoidReturnForSetter_method() { |
| 8107 Source source = addSource(EngineTestCase.createSource(["class A {", " int s
et x(int v) {", " return 42;", " }", "}"])); | 8107 Source source = addSource(EngineTestCase.createSource(["class A {", " int s
et x(int v) {", " return 42;", " }", "}"])); |
| 8108 resolve(source); | 8108 resolve(source); |
| 8109 assertErrors([StaticWarningCode.NON_VOID_RETURN_FOR_SETTER]); | 8109 assertErrors([StaticWarningCode.NON_VOID_RETURN_FOR_SETTER]); |
| 8110 verify([source]); | 8110 verify([source]); |
| 8111 } | 8111 } |
| 8112 void test_notAType() { |
| 8113 Source source = addSource(EngineTestCase.createSource(["f() {}", "main() {",
" f v = null;", "}"])); |
| 8114 resolve(source); |
| 8115 assertErrors([StaticWarningCode.NOT_A_TYPE]); |
| 8116 verify([source]); |
| 8117 } |
| 8112 void test_notEnoughRequiredArguments() { | 8118 void test_notEnoughRequiredArguments() { |
| 8113 Source source = addSource(EngineTestCase.createSource(["f(int a, String b) {
}", "main() {", " f();", "}"])); | 8119 Source source = addSource(EngineTestCase.createSource(["f(int a, String b) {
}", "main() {", " f();", "}"])); |
| 8114 resolve(source); | 8120 resolve(source); |
| 8115 assertErrors([StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]); | 8121 assertErrors([StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]); |
| 8116 verify([source]); | 8122 verify([source]); |
| 8117 } | 8123 } |
| 8118 void test_partOfDifferentLibrary() { | 8124 void test_partOfDifferentLibrary() { |
| 8119 Source source = addSource(EngineTestCase.createSource(["library lib;", "part
'part.dart';"])); | 8125 Source source = addSource(EngineTestCase.createSource(["library lib;", "part
'part.dart';"])); |
| 8120 addSource2("/part.dart", EngineTestCase.createSource(["part of lub;"])); | 8126 addSource2("/part.dart", EngineTestCase.createSource(["part of lub;"])); |
| 8121 resolve(source); | 8127 resolve(source); |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8612 runJUnitTest(__test, __test.test_nonVoidReturnForOperator); | 8618 runJUnitTest(__test, __test.test_nonVoidReturnForOperator); |
| 8613 }); | 8619 }); |
| 8614 _ut.test('test_nonVoidReturnForSetter_function', () { | 8620 _ut.test('test_nonVoidReturnForSetter_function', () { |
| 8615 final __test = new StaticWarningCodeTest(); | 8621 final __test = new StaticWarningCodeTest(); |
| 8616 runJUnitTest(__test, __test.test_nonVoidReturnForSetter_function); | 8622 runJUnitTest(__test, __test.test_nonVoidReturnForSetter_function); |
| 8617 }); | 8623 }); |
| 8618 _ut.test('test_nonVoidReturnForSetter_method', () { | 8624 _ut.test('test_nonVoidReturnForSetter_method', () { |
| 8619 final __test = new StaticWarningCodeTest(); | 8625 final __test = new StaticWarningCodeTest(); |
| 8620 runJUnitTest(__test, __test.test_nonVoidReturnForSetter_method); | 8626 runJUnitTest(__test, __test.test_nonVoidReturnForSetter_method); |
| 8621 }); | 8627 }); |
| 8628 _ut.test('test_notAType', () { |
| 8629 final __test = new StaticWarningCodeTest(); |
| 8630 runJUnitTest(__test, __test.test_notAType); |
| 8631 }); |
| 8622 _ut.test('test_notEnoughRequiredArguments', () { | 8632 _ut.test('test_notEnoughRequiredArguments', () { |
| 8623 final __test = new StaticWarningCodeTest(); | 8633 final __test = new StaticWarningCodeTest(); |
| 8624 runJUnitTest(__test, __test.test_notEnoughRequiredArguments); | 8634 runJUnitTest(__test, __test.test_notEnoughRequiredArguments); |
| 8625 }); | 8635 }); |
| 8626 _ut.test('test_partOfDifferentLibrary', () { | 8636 _ut.test('test_partOfDifferentLibrary', () { |
| 8627 final __test = new StaticWarningCodeTest(); | 8637 final __test = new StaticWarningCodeTest(); |
| 8628 runJUnitTest(__test, __test.test_partOfDifferentLibrary); | 8638 runJUnitTest(__test, __test.test_partOfDifferentLibrary); |
| 8629 }); | 8639 }); |
| 8630 _ut.test('test_redirectToInvalidFunctionType', () { | 8640 _ut.test('test_redirectToInvalidFunctionType', () { |
| 8631 final __test = new StaticWarningCodeTest(); | 8641 final __test = new StaticWarningCodeTest(); |
| (...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11254 // CompileTimeErrorCodeTest.dartSuite(); | 11264 // CompileTimeErrorCodeTest.dartSuite(); |
| 11255 // ErrorResolverTest.dartSuite(); | 11265 // ErrorResolverTest.dartSuite(); |
| 11256 // NonErrorResolverTest.dartSuite(); | 11266 // NonErrorResolverTest.dartSuite(); |
| 11257 // PubSuggestionCodeTest.dartSuite(); | 11267 // PubSuggestionCodeTest.dartSuite(); |
| 11258 // SimpleResolverTest.dartSuite(); | 11268 // SimpleResolverTest.dartSuite(); |
| 11259 // StaticTypeWarningCodeTest.dartSuite(); | 11269 // StaticTypeWarningCodeTest.dartSuite(); |
| 11260 // StaticWarningCodeTest.dartSuite(); | 11270 // StaticWarningCodeTest.dartSuite(); |
| 11261 // StrictModeTest.dartSuite(); | 11271 // StrictModeTest.dartSuite(); |
| 11262 // TypePropagationTest.dartSuite(); | 11272 // TypePropagationTest.dartSuite(); |
| 11263 } | 11273 } |
| OLD | NEW |