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

Side by Side Diff: pkg/kernel/testcases/reify/generic_methods_bounds_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_bounds_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 fun<T extends self::A>(dynamic t, {core::List<typ::ReifiedType> $typePa rameters}) → void {}
33 get $type() → typ::ReifiedType
34 return new typ::Interface::•(self::$declarations.[](2));
35 get $is$TypeError() → core::bool
36 return false;
37 }
38 class Closure#main#function extends core::Object implements core::Function, int: :HasRuntimeTypeGetter {
39 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
40 field mock::Context context;
41 constructor •(final mock::Context context) → dynamic
42 : self::Closure#main#function::context = context
43 ;
44 method call() → dynamic {
45 "This is a temporary solution. In the VM, this will become an additional par ameter.";
46 final mock::Context #contextParameter = this.{self::Closure#main#function::c ontext};
47 return #contextParameter.[](0).fun(new self::B::•(), $typeParameters: <typ:: ReifiedType>[new typ::Interface::•(self::$declarations.[](1))]);
48 }
49 get $type() → typ::ReifiedType
50 return new typ::Interface::•(self::$declarations.[](3));
51 get $is$TypeError() → core::bool
52 return false;
53 }
54 class Closure#main#function#1 extends core::Object implements core::Function, in t::HasRuntimeTypeGetter {
55 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
56 field mock::Context context;
57 constructor •(final mock::Context context) → dynamic
58 : self::Closure#main#function#1::context = context
59 ;
60 method call(dynamic e) → core::bool {
61 "This is a temporary solution. In the VM, this will become an additional par ameter.";
62 final mock::Context #contextParameter = this.{self::Closure#main#function#1: :context};
63 return typ::isSubtypeOf(int::type(e), new typ::Interface::•(self::$declarati ons.[](5)));
64 }
65 get $type() → typ::ReifiedType
66 return new typ::Interface::•(self::$declarations.[](4));
67 get $is$TypeError() → core::bool
68 return false;
69 }
70 static final field core::List<dec::Class> $declarations = (core::List<dec::Class > d) → core::List<dec::Class> {
71 dec::init(d, 0, new typ::Interface::•(d.[](20)));
72 dec::init(d, 1, new typ::Interface::•(d.[](20)));
73 dec::init(d, 2, new typ::Interface::•(d.[](20)));
74 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>[]));
75 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::•()]));
76 dec::init(d, 5, new typ::Interface::•(d.[](23)));
77 dec::init(d, 6, new typ::Interface::•(d.[](20)));
78 dec::init(d, 7, new typ::Interface::•(d.[](20)));
79 dec::init(d, 8, new typ::Interface::•(d.[](20)));
80 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))]);
81 dec::init(d, 10, new typ::Interface::•(d.[](26)));
82 dec::init(d, 11, new typ::Interface::•(d.[](26)));
83 dec::init(d, 12, new typ::Interface::•(d.[](20)));
84 dec::init(d, 13, new typ::Interface::•(d.[](27)));
85 dec::init(d, 14, new typ::Interface::•(d.[](27)));
86 dec::init(d, 15, new typ::Interface::•(d.[](27)));
87 dec::init(d, 16, new typ::Interface::•(d.[](27)));
88 dec::init(d, 17, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface ::•(d.[](28))]);
89 dec::init(d, 18, new typ::Interface::•(d.[](19)));
90 dec::init(d, 19, new typ::Interface::•(d.[](27)));
91 dec::init(d, 20, null);
92 dec::init(d, 22, new typ::Interface::•(d.[](20)));
93 dec::init(d, 23, new typ::Interface::•(d.[](27)));
94 dec::init(d, 24, new typ::Interface::•(d.[](20)));
95 dec::init(d, 25, new typ::Interface::•(d.[](20)));
96 dec::init(d, 26, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface ::•(d.[](24), <dynamic>[new typ::Interface::•(d.[](26))])]);
97 dec::init(d, 27, new typ::Interface::•(d.[](20)));
98 dec::init(d, 28, new typ::Interface::•(d.[](20)));
99 return d;
100 }.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]));
101 static method main() → dynamic {
102 final mock::Context #context = int::attachType(new mock::Context::•(1), new ty p::Interface::•(self::$declarations.[](6)));
103 #context.[]=(0, new self::C::•());
104 tes::expectThrows(new self::Closure#main#function::•(#context), new self::Clos ure#main#function#1::•(#context));
105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698