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

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

Issue 46593003: Add @proxy to annotations.dart - remove package:meta. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head 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
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 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after
2929 " B(S p) : super(p);", 2929 " B(S p) : super(p);",
2930 " B.named(S p) : super.named(p);", 2930 " B.named(S p) : super.named(p);",
2931 "}"])); 2931 "}"]));
2932 resolve(source); 2932 resolve(source);
2933 assertNoErrors(source); 2933 assertNoErrors(source);
2934 verify([source]); 2934 verify([source]);
2935 } 2935 }
2936 void test_proxy_annotation_prefixed() { 2936 void test_proxy_annotation_prefixed() {
2937 Source source = addSource(EngineTestCase.createSource([ 2937 Source source = addSource(EngineTestCase.createSource([
2938 "library L;", 2938 "library L;",
2939 "import 'meta.dart';",
2940 "@proxy", 2939 "@proxy",
2941 "class A {}", 2940 "class A {}",
2942 "f(A a) {", 2941 "f(A a) {",
2943 " a.m();", 2942 " a.m();",
2944 " var x = a.g;", 2943 " var x = a.g;",
2945 " a.s = 1;", 2944 " a.s = 1;",
2946 " var y = a + a;", 2945 " var y = a + a;",
2947 " a++;", 2946 " a++;",
2948 " ++a;", 2947 " ++a;",
2949 "}"])); 2948 "}"]));
2950 addSource2("/meta.dart", EngineTestCase.createSource([
2951 "library meta;",
2952 "const proxy = const _Proxy();",
2953 "class _Proxy { const _Proxy(); }"]));
2954 resolve(source); 2949 resolve(source);
2955 assertNoErrors(source); 2950 assertNoErrors(source);
2956 } 2951 }
2957 void test_proxy_annotation_prefixed2() { 2952 void test_proxy_annotation_prefixed2() {
2958 Source source = addSource(EngineTestCase.createSource([ 2953 Source source = addSource(EngineTestCase.createSource([
2959 "library L;", 2954 "library L;",
2960 "import 'meta.dart';",
2961 "@proxy", 2955 "@proxy",
2962 "class A {}", 2956 "class A {}",
2963 "class B {", 2957 "class B {",
2964 " f(A a) {", 2958 " f(A a) {",
2965 " a.m();", 2959 " a.m();",
2966 " var x = a.g;", 2960 " var x = a.g;",
2967 " a.s = 1;", 2961 " a.s = 1;",
2968 " var y = a + a;", 2962 " var y = a + a;",
2969 " a++;", 2963 " a++;",
2970 " ++a;", 2964 " ++a;",
2971 " }", 2965 " }",
2972 "}"])); 2966 "}"]));
2973 addSource2("/meta.dart", EngineTestCase.createSource([
2974 "library meta;",
2975 "const proxy = const _Proxy();",
2976 "class _Proxy { const _Proxy(); }"]));
2977 resolve(source); 2967 resolve(source);
2978 assertNoErrors(source); 2968 assertNoErrors(source);
2979 } 2969 }
2980 void test_proxy_annotation_prefixed3() { 2970 void test_proxy_annotation_prefixed3() {
2981 Source source = addSource(EngineTestCase.createSource([ 2971 Source source = addSource(EngineTestCase.createSource([
2982 "library L;", 2972 "library L;",
2983 "import 'meta.dart';",
2984 "class B {", 2973 "class B {",
2985 " f(A a) {", 2974 " f(A a) {",
2986 " a.m();", 2975 " a.m();",
2987 " var x = a.g;", 2976 " var x = a.g;",
2988 " a.s = 1;", 2977 " a.s = 1;",
2989 " var y = a + a;", 2978 " var y = a + a;",
2990 " a++;", 2979 " a++;",
2991 " ++a;", 2980 " ++a;",
2992 " }", 2981 " }",
2993 "}", 2982 "}",
2994 "@proxy", 2983 "@proxy",
2995 "class A {}"])); 2984 "class A {}"]));
2996 addSource2("/meta.dart", EngineTestCase.createSource([
2997 "library meta;",
2998 "const proxy = const _Proxy();",
2999 "class _Proxy { const _Proxy(); }"]));
3000 resolve(source); 2985 resolve(source);
3001 assertNoErrors(source); 2986 assertNoErrors(source);
3002 } 2987 }
3003 void test_proxy_annotation_simple() { 2988 void test_proxy_annotation_simple() {
3004 Source source = addSource(EngineTestCase.createSource([ 2989 Source source = addSource(EngineTestCase.createSource([
3005 "library L;", 2990 "library L;",
3006 "import 'meta.dart';",
3007 "@proxy", 2991 "@proxy",
3008 "class B {", 2992 "class B {",
3009 " m() {", 2993 " m() {",
3010 " n();", 2994 " n();",
3011 " var x = g;", 2995 " var x = g;",
3012 " s = 1;", 2996 " s = 1;",
3013 " var y = this + this;", 2997 " var y = this + this;",
3014 " }", 2998 " }",
3015 "}"])); 2999 "}"]));
3016 addSource2("/meta.dart", EngineTestCase.createSource([
3017 "library meta;",
3018 "const proxy = const _Proxy();",
3019 "class _Proxy { const _Proxy(); }"]));
3020 resolve(source); 3000 resolve(source);
3021 assertNoErrors(source); 3001 assertNoErrors(source);
3022 } 3002 }
3023 void test_recursiveConstructorRedirect() { 3003 void test_recursiveConstructorRedirect() {
3024 Source source = addSource(EngineTestCase.createSource([ 3004 Source source = addSource(EngineTestCase.createSource([
3025 "class A {", 3005 "class A {",
3026 " A.a() : this.b();", 3006 " A.a() : this.b();",
3027 " A.b() : this.c();", 3007 " A.b() : this.c();",
3028 " A.c() {}", 3008 " A.c() {}",
3029 "}"])); 3009 "}"]));
(...skipping 15367 matching lines...) Expand 10 before | Expand all | Expand 10 after
18397 " bool operator ==(x) {}", 18377 " bool operator ==(x) {}",
18398 " get hashCode => 0;", 18378 " get hashCode => 0;",
18399 "}"])); 18379 "}"]));
18400 resolve(source); 18380 resolve(source);
18401 assertNoErrors(source); 18381 assertNoErrors(source);
18402 verify([source]); 18382 verify([source]);
18403 } 18383 }
18404 void test_proxy_annotation_prefixed() { 18384 void test_proxy_annotation_prefixed() {
18405 Source source = addSource(EngineTestCase.createSource([ 18385 Source source = addSource(EngineTestCase.createSource([
18406 "library L;", 18386 "library L;",
18407 "import 'meta.dart';",
18408 "@proxy", 18387 "@proxy",
18409 "class A {}", 18388 "class A {}",
18410 "f(var a) {", 18389 "f(var a) {",
18411 " a = new A();", 18390 " a = new A();",
18412 " a.m();", 18391 " a.m();",
18413 " var x = a.g;", 18392 " var x = a.g;",
18414 " a.s = 1;", 18393 " a.s = 1;",
18415 " var y = a + a;", 18394 " var y = a + a;",
18416 " a++;", 18395 " a++;",
18417 " ++a;", 18396 " ++a;",
18418 "}"])); 18397 "}"]));
18419 addSource2("/meta.dart", EngineTestCase.createSource([
18420 "library meta;",
18421 "const proxy = const _Proxy();",
18422 "class _Proxy { const _Proxy(); }"]));
18423 resolve(source); 18398 resolve(source);
18424 assertNoErrors(source); 18399 assertNoErrors(source);
18425 } 18400 }
18426 void test_proxy_annotation_prefixed2() { 18401 void test_proxy_annotation_prefixed2() {
18427 Source source = addSource(EngineTestCase.createSource([ 18402 Source source = addSource(EngineTestCase.createSource([
18428 "library L;", 18403 "library L;",
18429 "import 'meta.dart';",
18430 "@proxy", 18404 "@proxy",
18431 "class A {}", 18405 "class A {}",
18432 "class B {", 18406 "class B {",
18433 " f(var a) {", 18407 " f(var a) {",
18434 " a = new A();", 18408 " a = new A();",
18435 " a.m();", 18409 " a.m();",
18436 " var x = a.g;", 18410 " var x = a.g;",
18437 " a.s = 1;", 18411 " a.s = 1;",
18438 " var y = a + a;", 18412 " var y = a + a;",
18439 " a++;", 18413 " a++;",
18440 " ++a;", 18414 " ++a;",
18441 " }", 18415 " }",
18442 "}"])); 18416 "}"]));
18443 addSource2("/meta.dart", EngineTestCase.createSource([
18444 "library meta;",
18445 "const proxy = const _Proxy();",
18446 "class _Proxy { const _Proxy(); }"]));
18447 resolve(source); 18417 resolve(source);
18448 assertNoErrors(source); 18418 assertNoErrors(source);
18449 } 18419 }
18450 void test_proxy_annotation_prefixed3() { 18420 void test_proxy_annotation_prefixed3() {
18451 Source source = addSource(EngineTestCase.createSource([ 18421 Source source = addSource(EngineTestCase.createSource([
18452 "library L;", 18422 "library L;",
18453 "import 'meta.dart';",
18454 "class B {", 18423 "class B {",
18455 " f(var a) {", 18424 " f(var a) {",
18456 " a = new A();", 18425 " a = new A();",
18457 " a.m();", 18426 " a.m();",
18458 " var x = a.g;", 18427 " var x = a.g;",
18459 " a.s = 1;", 18428 " a.s = 1;",
18460 " var y = a + a;", 18429 " var y = a + a;",
18461 " a++;", 18430 " a++;",
18462 " ++a;", 18431 " ++a;",
18463 " }", 18432 " }",
18464 "}", 18433 "}",
18465 "@proxy", 18434 "@proxy",
18466 "class A {}"])); 18435 "class A {}"]));
18467 addSource2("/meta.dart", EngineTestCase.createSource([
18468 "library meta;",
18469 "const proxy = const _Proxy();",
18470 "class _Proxy { const _Proxy(); }"]));
18471 resolve(source); 18436 resolve(source);
18472 assertNoErrors(source); 18437 assertNoErrors(source);
18473 } 18438 }
18474 void test_undefinedGetter_inSubtype() { 18439 void test_undefinedGetter_inSubtype() {
18475 Source source = addSource(EngineTestCase.createSource([ 18440 Source source = addSource(EngineTestCase.createSource([
18476 "class A {}", 18441 "class A {}",
18477 "class B extends A {", 18442 "class B extends A {",
18478 " get b => 0;", 18443 " get b => 0;",
18479 "}", 18444 "}",
18480 "f(var a) {", 18445 "f(var a) {",
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
20070 // ErrorResolverTest.dartSuite(); 20035 // ErrorResolverTest.dartSuite();
20071 // HintCodeTest.dartSuite(); 20036 // HintCodeTest.dartSuite();
20072 // MemberMapTest.dartSuite(); 20037 // MemberMapTest.dartSuite();
20073 // NonHintCodeTest.dartSuite(); 20038 // NonHintCodeTest.dartSuite();
20074 // NonErrorResolverTest.dartSuite(); 20039 // NonErrorResolverTest.dartSuite();
20075 // SimpleResolverTest.dartSuite(); 20040 // SimpleResolverTest.dartSuite();
20076 // StaticTypeWarningCodeTest.dartSuite(); 20041 // StaticTypeWarningCodeTest.dartSuite();
20077 // StaticWarningCodeTest.dartSuite(); 20042 // StaticWarningCodeTest.dartSuite();
20078 // StrictModeTest.dartSuite(); 20043 // StrictModeTest.dartSuite();
20079 // TypePropagationTest.dartSuite(); 20044 // TypePropagationTest.dartSuite();
20080 } 20045 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698