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

Side by Side Diff: pkg/kernel/testcases/reify/generic_methods_dynamic_simple_error_test.dart.expect

Issue 2756693002: Add generic-methods 'golden' tests for 'reify' transformation (Closed)
Patch Set: Created 3 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
OLDNEW
(Empty)
1 library generic_methods_dynamic_simple_error_test;
2 import self as self;
3 import "dart:core" as core;
4 import "../../runtime/reify/interceptors.dart" as int;
5 import "../../runtime/reify/types.dart" as typ;
6 import "dart:mock" as mock;
7 import "./test_base.dart" as tes;
8 import "../../runtime/reify/declarations.dart" as dec;
9
10 class A extends core::Object implements int::HasRuntimeTypeGetter {
11 constructor •() → void
12 : super core::Object::•()
13 ;
14 get $type() → typ::ReifiedType
15 return new typ::Interface::•(self::$declarations.[](0));
16 get $is$TypeError() → core::bool
17 return false;
18 }
19 class B extends core::Object implements int::HasRuntimeTypeGetter {
20 constructor •() → void
21 : super core::Object::•()
22 ;
23 get $type() → typ::ReifiedType
24 return new typ::Interface::•(self::$declarations.[](1));
25 get $is$TypeError() → core::bool
26 return false;
27 }
28 class C extends core::Object implements int::HasRuntimeTypeGetter {
29 constructor •() → void
30 : super core::Object::•()
31 ;
32 method foo<T extends core::Object>(dynamic t, {core::List<typ::ReifiedType> $t ypeParameters}) → dynamic {
33 return t;
34 }
35 get $type() → typ::ReifiedType
36 return new typ::Interface::•(self::$declarations.[](2));
37 get $is$TypeError() → core::bool
38 return false;
39 }
40 class Closure#main#function extends core::Object implements core::Function, int: :HasRuntimeTypeGetter {
41 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
42 field mock::Context context;
43 constructor •(final mock::Context context) → dynamic
44 : self::Closure#main#function::context = context
45 ;
46 method call() → dynamic {
47 "This is a temporary solution. In the VM, this will become an additional par ameter.";
48 final mock::Context #contextParameter = this.{self::Closure#main#function::c ontext};
49 return #contextParameter.[](1).foo(#contextParameter.[](0), $typeParameters: <typ::ReifiedType>[new typ::Interface::•(self::$declarations.[](0))]);
50 }
51 get $type() → typ::ReifiedType
52 return new typ::Interface::•(self::$declarations.[](3));
53 get $is$TypeError() → core::bool
54 return false;
55 }
56 class Closure#main#function#1 extends core::Object implements core::Function, in t::HasRuntimeTypeGetter {
57 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
58 field mock::Context context;
59 constructor •(final mock::Context context) → dynamic
60 : self::Closure#main#function#1::context = context
61 ;
62 method call(dynamic e) → core::bool {
63 "This is a temporary solution. In the VM, this will become an additional par ameter.";
64 final mock::Context #contextParameter = this.{self::Closure#main#function#1: :context};
65 return typ::isSubtypeOf(int::type(e), new typ::Interface::•(self::$declarati ons.[](5)));
66 }
67 get $type() → typ::ReifiedType
68 return new typ::Interface::•(self::$declarations.[](4));
69 get $is$TypeError() → core::bool
70 return false;
71 }
72 static final field core::List<dec::Class> $declarations = (core::List<dec::Class > d) → core::List<dec::Class> {
73 dec::init(d, 0, new typ::Interface::•(d.[](20)));
74 dec::init(d, 1, new typ::Interface::•(d.[](20)));
75 dec::init(d, 2, new typ::Interface::•(d.[](20)));
76 dec::init(d, 3, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface: :•(d.[](22))], new typ::FunctionType::•(new typ::Interface::•(d.[](22)), const t yp::Dynamic::•(), 0, <dynamic>[]));
77 dec::init(d, 4, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface: :•(d.[](22))], new typ::FunctionType::•(new typ::Interface::•(d.[](22)), new typ ::Interface::•(d.[](8)), 0, <dynamic>[const typ::Dynamic::•()]));
78 dec::init(d, 5, new typ::Interface::•(d.[](23)));
79 dec::init(d, 6, new typ::Interface::•(d.[](20)));
80 dec::init(d, 7, new typ::Interface::•(d.[](20)));
81 dec::init(d, 8, new typ::Interface::•(d.[](20)));
82 dec::init(d, 9, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface: :•(d.[](24), <dynamic>[new typ::Interface::•(d.[](9))]), new typ::Interface::•(d .[](25))]);
83 dec::init(d, 10, new typ::Interface::•(d.[](26)));
84 dec::init(d, 11, new typ::Interface::•(d.[](26)));
85 dec::init(d, 12, new typ::Interface::•(d.[](20)));
86 dec::init(d, 13, new typ::Interface::•(d.[](27)));
87 dec::init(d, 14, new typ::Interface::•(d.[](27)));
88 dec::init(d, 15, new typ::Interface::•(d.[](27)));
89 dec::init(d, 16, new typ::Interface::•(d.[](27)));
90 dec::init(d, 17, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface ::•(d.[](28))]);
91 dec::init(d, 18, new typ::Interface::•(d.[](19)));
92 dec::init(d, 19, new typ::Interface::•(d.[](27)));
93 dec::init(d, 20, null);
94 dec::init(d, 22, new typ::Interface::•(d.[](20)));
95 dec::init(d, 23, new typ::Interface::•(d.[](27)));
96 dec::init(d, 24, new typ::Interface::•(d.[](20)));
97 dec::init(d, 25, new typ::Interface::•(d.[](20)));
98 dec::init(d, 26, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface ::•(d.[](24), <dynamic>[new typ::Interface::•(d.[](26))])]);
99 dec::init(d, 27, new typ::Interface::•(d.[](20)));
100 dec::init(d, 28, new typ::Interface::•(d.[](20)));
101 return d;
102 }.call(dec::allocateDeclarations(<dynamic>["A", "B", "C", "Closure#main#function ", "Closure#main#function#1", "TypeError", "Context", "Null", "bool", "String", "int", "double", "Type", "AbstractClassInstantiationError", "NoSuchMethodError", "CyclicInitializationError", "UnsupportedError", "IntegerDivisionByZeroExceptio n", "RangeError", "ArgumentError", "Object", "HasRuntimeTypeGetter", "Function", "AssertionError", "Comparable", "Pattern", "num", "Error", "Exception"], <dynam ic>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 , 0, 0, 0]));
103 static method main() → dynamic {
104 final mock::Context #context = int::attachType(new mock::Context::•(2), new ty p::Interface::•(self::$declarations.[](6)));
105 #context.[]=(0, new self::B::•());
106 self::C c = new self::C::•();
107 #context.[]=(1, c);
108 tes::expectThrows(new self::Closure#main#function::•(#context), new self::Clos ure#main#function#1::•(#context));
109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698