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

Side by Side Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 49383002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | tests/co19/co19-analyzer2.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.resolver_test; 3 library engine.resolver_test;
4 import 'package:analyzer/src/generated/java_core.dart'; 4 import 'package:analyzer/src/generated/java_core.dart';
5 import 'package:analyzer/src/generated/java_junit.dart'; 5 import 'package:analyzer/src/generated/java_junit.dart';
6 import 'package:analyzer/src/generated/source_io.dart'; 6 import 'package:analyzer/src/generated/source_io.dart';
7 import 'package:analyzer/src/generated/error.dart'; 7 import 'package:analyzer/src/generated/error.dart';
8 import 'package:analyzer/src/generated/scanner.dart'; 8 import 'package:analyzer/src/generated/scanner.dart';
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; 10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
(...skipping 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 resolve(source); 2550 resolve(source);
2551 assertNoErrors(source); 2551 assertNoErrors(source);
2552 verify([source]); 2552 verify([source]);
2553 } 2553 }
2554 void test_nonBoolExpression_interfaceType() { 2554 void test_nonBoolExpression_interfaceType() {
2555 Source source = addSource(EngineTestCase.createSource(["f() {", " assert(tr ue);", "}"])); 2555 Source source = addSource(EngineTestCase.createSource(["f() {", " assert(tr ue);", "}"]));
2556 resolve(source); 2556 resolve(source);
2557 assertNoErrors(source); 2557 assertNoErrors(source);
2558 verify([source]); 2558 verify([source]);
2559 } 2559 }
2560 void test_nonBoolNegationExpression() {
2561 Source source = addSource(EngineTestCase.createSource([
2562 "f(bool pb, pd) {",
2563 " !true;",
2564 " !false;",
2565 " !pb;",
2566 " !pd;",
2567 "}"]));
2568 resolve(source);
2569 assertNoErrors(source);
2570 verify([source]);
2571 }
2560 void test_nonConstantDefaultValue_function_named() { 2572 void test_nonConstantDefaultValue_function_named() {
2561 Source source = addSource(EngineTestCase.createSource(["f({x : 2 + 3}) {}"]) ); 2573 Source source = addSource(EngineTestCase.createSource(["f({x : 2 + 3}) {}"]) );
2562 resolve(source); 2574 resolve(source);
2563 assertNoErrors(source); 2575 assertNoErrors(source);
2564 verify([source]); 2576 verify([source]);
2565 } 2577 }
2566 void test_nonConstantDefaultValue_function_positional() { 2578 void test_nonConstantDefaultValue_function_positional() {
2567 Source source = addSource(EngineTestCase.createSource(["f([x = 2 + 3]) {}"]) ); 2579 Source source = addSource(EngineTestCase.createSource(["f([x = 2 + 3]) {}"]) );
2568 resolve(source); 2580 resolve(source);
2569 assertNoErrors(source); 2581 assertNoErrors(source);
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
4360 runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberO ne_noSuchMethod_method); 4372 runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberO ne_noSuchMethod_method);
4361 }); 4373 });
4362 _ut.test('test_nonBoolExpression_functionType', () { 4374 _ut.test('test_nonBoolExpression_functionType', () {
4363 final __test = new NonErrorResolverTest(); 4375 final __test = new NonErrorResolverTest();
4364 runJUnitTest(__test, __test.test_nonBoolExpression_functionType); 4376 runJUnitTest(__test, __test.test_nonBoolExpression_functionType);
4365 }); 4377 });
4366 _ut.test('test_nonBoolExpression_interfaceType', () { 4378 _ut.test('test_nonBoolExpression_interfaceType', () {
4367 final __test = new NonErrorResolverTest(); 4379 final __test = new NonErrorResolverTest();
4368 runJUnitTest(__test, __test.test_nonBoolExpression_interfaceType); 4380 runJUnitTest(__test, __test.test_nonBoolExpression_interfaceType);
4369 }); 4381 });
4382 _ut.test('test_nonBoolNegationExpression', () {
4383 final __test = new NonErrorResolverTest();
4384 runJUnitTest(__test, __test.test_nonBoolNegationExpression);
4385 });
4370 _ut.test('test_nonConstCaseExpression', () { 4386 _ut.test('test_nonConstCaseExpression', () {
4371 final __test = new NonErrorResolverTest(); 4387 final __test = new NonErrorResolverTest();
4372 runJUnitTest(__test, __test.test_nonConstCaseExpression); 4388 runJUnitTest(__test, __test.test_nonConstCaseExpression);
4373 }); 4389 });
4374 _ut.test('test_nonConstMapAsExpressionStatement_const', () { 4390 _ut.test('test_nonConstMapAsExpressionStatement_const', () {
4375 final __test = new NonErrorResolverTest(); 4391 final __test = new NonErrorResolverTest();
4376 runJUnitTest(__test, __test.test_nonConstMapAsExpressionStatement_const) ; 4392 runJUnitTest(__test, __test.test_nonConstMapAsExpressionStatement_const) ;
4377 }); 4393 });
4378 _ut.test('test_nonConstMapAsExpressionStatement_notExpressionStatement', ( ) { 4394 _ut.test('test_nonConstMapAsExpressionStatement_notExpressionStatement', ( ) {
4379 final __test = new NonErrorResolverTest(); 4395 final __test = new NonErrorResolverTest();
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
5194 resolve(source); 5210 resolve(source);
5195 assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]); 5211 assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
5196 verify([source]); 5212 verify([source]);
5197 } 5213 }
5198 void test_nonBoolExpression_interfaceType() { 5214 void test_nonBoolExpression_interfaceType() {
5199 Source source = addSource(EngineTestCase.createSource(["f() {", " assert(0) ;", "}"])); 5215 Source source = addSource(EngineTestCase.createSource(["f() {", " assert(0) ;", "}"]));
5200 resolve(source); 5216 resolve(source);
5201 assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]); 5217 assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
5202 verify([source]); 5218 verify([source]);
5203 } 5219 }
5220 void test_nonBoolNegationExpression() {
5221 Source source = addSource(EngineTestCase.createSource(["f() {", " !42;", "} "]));
5222 resolve(source);
5223 assertErrors(source, [StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION]);
5224 verify([source]);
5225 }
5204 void test_nonTypeAsTypeArgument_notAType() { 5226 void test_nonTypeAsTypeArgument_notAType() {
5205 Source source = addSource(EngineTestCase.createSource(["int A;", "class B<E> {}", "f(B<A> b) {}"])); 5227 Source source = addSource(EngineTestCase.createSource(["int A;", "class B<E> {}", "f(B<A> b) {}"]));
5206 resolve(source); 5228 resolve(source);
5207 assertErrors(source, [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]); 5229 assertErrors(source, [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
5208 verify([source]); 5230 verify([source]);
5209 } 5231 }
5210 void test_nonTypeAsTypeArgument_undefinedIdentifier() { 5232 void test_nonTypeAsTypeArgument_undefinedIdentifier() {
5211 Source source = addSource(EngineTestCase.createSource(["class B<E> {}", "f(B <A> b) {}"])); 5233 Source source = addSource(EngineTestCase.createSource(["class B<E> {}", "f(B <A> b) {}"]));
5212 resolve(source); 5234 resolve(source);
5213 assertErrors(source, [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]); 5235 assertErrors(source, [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
5868 runJUnitTest(__test, __test.test_nonBoolCondition_while); 5890 runJUnitTest(__test, __test.test_nonBoolCondition_while);
5869 }); 5891 });
5870 _ut.test('test_nonBoolExpression_functionType', () { 5892 _ut.test('test_nonBoolExpression_functionType', () {
5871 final __test = new StaticTypeWarningCodeTest(); 5893 final __test = new StaticTypeWarningCodeTest();
5872 runJUnitTest(__test, __test.test_nonBoolExpression_functionType); 5894 runJUnitTest(__test, __test.test_nonBoolExpression_functionType);
5873 }); 5895 });
5874 _ut.test('test_nonBoolExpression_interfaceType', () { 5896 _ut.test('test_nonBoolExpression_interfaceType', () {
5875 final __test = new StaticTypeWarningCodeTest(); 5897 final __test = new StaticTypeWarningCodeTest();
5876 runJUnitTest(__test, __test.test_nonBoolExpression_interfaceType); 5898 runJUnitTest(__test, __test.test_nonBoolExpression_interfaceType);
5877 }); 5899 });
5900 _ut.test('test_nonBoolNegationExpression', () {
5901 final __test = new StaticTypeWarningCodeTest();
5902 runJUnitTest(__test, __test.test_nonBoolNegationExpression);
5903 });
5878 _ut.test('test_nonTypeAsTypeArgument_notAType', () { 5904 _ut.test('test_nonTypeAsTypeArgument_notAType', () {
5879 final __test = new StaticTypeWarningCodeTest(); 5905 final __test = new StaticTypeWarningCodeTest();
5880 runJUnitTest(__test, __test.test_nonTypeAsTypeArgument_notAType); 5906 runJUnitTest(__test, __test.test_nonTypeAsTypeArgument_notAType);
5881 }); 5907 });
5882 _ut.test('test_nonTypeAsTypeArgument_undefinedIdentifier', () { 5908 _ut.test('test_nonTypeAsTypeArgument_undefinedIdentifier', () {
5883 final __test = new StaticTypeWarningCodeTest(); 5909 final __test = new StaticTypeWarningCodeTest();
5884 runJUnitTest(__test, __test.test_nonTypeAsTypeArgument_undefinedIdentifi er); 5910 runJUnitTest(__test, __test.test_nonTypeAsTypeArgument_undefinedIdentifi er);
5885 }); 5911 });
5886 _ut.test('test_returnOfInvalidType_expressionFunctionBody_function', () { 5912 _ut.test('test_returnOfInvalidType_expressionFunctionBody_function', () {
5887 final __test = new StaticTypeWarningCodeTest(); 5913 final __test = new StaticTypeWarningCodeTest();
(...skipping 4598 matching lines...) Expand 10 before | Expand all | Expand 10 after
10486 } 10512 }
10487 void test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias() { 10513 void test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias() {
10488 Source source = addSource(EngineTestCase.createSource([ 10514 Source source = addSource(EngineTestCase.createSource([
10489 "class A {}", 10515 "class A {}",
10490 "class M {}", 10516 "class M {}",
10491 "class B = A with M implements B;"])); 10517 "class B = A with M implements B;"]));
10492 resolve(source); 10518 resolve(source);
10493 assertErrors(source, [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_B ASE_CASE_IMPLEMENTS]); 10519 assertErrors(source, [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_B ASE_CASE_IMPLEMENTS]);
10494 verify([source]); 10520 verify([source]);
10495 } 10521 }
10522 void test_redirectToMissingConstructor_named() {
10523 Source source = addSource(EngineTestCase.createSource([
10524 "class A implements B{",
10525 " A() {}",
10526 "}",
10527 "class B {",
10528 " const factory B() = A.name;",
10529 "}"]));
10530 resolve(source);
10531 assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]) ;
10532 }
10533 void test_redirectToMissingConstructor_unnamed() {
10534 Source source = addSource(EngineTestCase.createSource([
10535 "class A implements B{",
10536 " A.name() {}",
10537 "}",
10538 "class B {",
10539 " const factory B() = A;",
10540 "}"]));
10541 resolve(source);
10542 assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]) ;
10543 }
10544 void test_redirectToNonClass_notAType() {
10545 Source source = addSource(EngineTestCase.createSource(["int A;", "class B {" , " const factory B() = A;", "}"]));
10546 resolve(source);
10547 assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
10548 verify([source]);
10549 }
10550 void test_redirectToNonClass_undefinedIdentifier() {
10551 Source source = addSource(EngineTestCase.createSource(["class B {", " const factory B() = A;", "}"]));
10552 resolve(source);
10553 assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
10554 verify([source]);
10555 }
10496 void test_redirectToNonConstConstructor() { 10556 void test_redirectToNonConstConstructor() {
10497 Source source = addSource(EngineTestCase.createSource([ 10557 Source source = addSource(EngineTestCase.createSource([
10498 "class A {", 10558 "class A {",
10499 " A.a() {}", 10559 " A.a() {}",
10500 " const factory A.b() = A.a;", 10560 " const factory A.b() = A.a;",
10501 "}"])); 10561 "}"]));
10502 resolve(source); 10562 resolve(source);
10503 assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR ]); 10563 assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR ]);
10504 verify([source]); 10564 verify([source]);
10505 } 10565 }
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
12031 runJUnitTest(__test, __test.test_recursiveInterfaceInheritance_tail); 12091 runJUnitTest(__test, __test.test_recursiveInterfaceInheritance_tail);
12032 }); 12092 });
12033 _ut.test('test_recursiveInterfaceInheritance_tail2', () { 12093 _ut.test('test_recursiveInterfaceInheritance_tail2', () {
12034 final __test = new CompileTimeErrorCodeTest(); 12094 final __test = new CompileTimeErrorCodeTest();
12035 runJUnitTest(__test, __test.test_recursiveInterfaceInheritance_tail2); 12095 runJUnitTest(__test, __test.test_recursiveInterfaceInheritance_tail2);
12036 }); 12096 });
12037 _ut.test('test_recursiveInterfaceInheritance_tail3', () { 12097 _ut.test('test_recursiveInterfaceInheritance_tail3', () {
12038 final __test = new CompileTimeErrorCodeTest(); 12098 final __test = new CompileTimeErrorCodeTest();
12039 runJUnitTest(__test, __test.test_recursiveInterfaceInheritance_tail3); 12099 runJUnitTest(__test, __test.test_recursiveInterfaceInheritance_tail3);
12040 }); 12100 });
12101 _ut.test('test_redirectToMissingConstructor_named', () {
12102 final __test = new CompileTimeErrorCodeTest();
12103 runJUnitTest(__test, __test.test_redirectToMissingConstructor_named);
12104 });
12105 _ut.test('test_redirectToMissingConstructor_unnamed', () {
12106 final __test = new CompileTimeErrorCodeTest();
12107 runJUnitTest(__test, __test.test_redirectToMissingConstructor_unnamed);
12108 });
12109 _ut.test('test_redirectToNonClass_notAType', () {
12110 final __test = new CompileTimeErrorCodeTest();
12111 runJUnitTest(__test, __test.test_redirectToNonClass_notAType);
12112 });
12113 _ut.test('test_redirectToNonClass_undefinedIdentifier', () {
12114 final __test = new CompileTimeErrorCodeTest();
12115 runJUnitTest(__test, __test.test_redirectToNonClass_undefinedIdentifier) ;
12116 });
12041 _ut.test('test_redirectToNonConstConstructor', () { 12117 _ut.test('test_redirectToNonConstConstructor', () {
12042 final __test = new CompileTimeErrorCodeTest(); 12118 final __test = new CompileTimeErrorCodeTest();
12043 runJUnitTest(__test, __test.test_redirectToNonConstConstructor); 12119 runJUnitTest(__test, __test.test_redirectToNonConstConstructor);
12044 }); 12120 });
12045 _ut.test('test_referenceToDeclaredVariableInInitializer_closure', () { 12121 _ut.test('test_referenceToDeclaredVariableInInitializer_closure', () {
12046 final __test = new CompileTimeErrorCodeTest(); 12122 final __test = new CompileTimeErrorCodeTest();
12047 runJUnitTest(__test, __test.test_referenceToDeclaredVariableInInitialize r_closure); 12123 runJUnitTest(__test, __test.test_referenceToDeclaredVariableInInitialize r_closure);
12048 }); 12124 });
12049 _ut.test('test_referenceToDeclaredVariableInInitializer_getter', () { 12125 _ut.test('test_referenceToDeclaredVariableInInitializer_getter', () {
12050 final __test = new CompileTimeErrorCodeTest(); 12126 final __test = new CompileTimeErrorCodeTest();
(...skipping 7944 matching lines...) Expand 10 before | Expand all | Expand 10 after
19995 // HintCodeTest.dartSuite(); 20071 // HintCodeTest.dartSuite();
19996 // MemberMapTest.dartSuite(); 20072 // MemberMapTest.dartSuite();
19997 // NonHintCodeTest.dartSuite(); 20073 // NonHintCodeTest.dartSuite();
19998 // NonErrorResolverTest.dartSuite(); 20074 // NonErrorResolverTest.dartSuite();
19999 // SimpleResolverTest.dartSuite(); 20075 // SimpleResolverTest.dartSuite();
20000 // StaticTypeWarningCodeTest.dartSuite(); 20076 // StaticTypeWarningCodeTest.dartSuite();
20001 // StaticWarningCodeTest.dartSuite(); 20077 // StaticWarningCodeTest.dartSuite();
20002 // StrictModeTest.dartSuite(); 20078 // StrictModeTest.dartSuite();
20003 // TypePropagationTest.dartSuite(); 20079 // TypePropagationTest.dartSuite();
20004 } 20080 }
OLDNEW
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | tests/co19/co19-analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698