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

Side by Side Diff: pkg/kernel/testcases/closures/catch.dart.expect

Issue 2767773004: Add Vector type to Kernel (Closed)
Patch Set: Add a note to return Run step in Closure Conversion test suite 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
1 library; 1 library;
2 import self as self; 2 import self as self;
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:mock" as mock;
5 4
6 class Closure#main#function extends core::Object implements core::Function { 5 class Closure#main#function extends core::Object implements core::Function {
7 field core::String note = "This is temporary. The VM doesn't need closure clas ses."; 6 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
8 field mock::Context context; 7 field Vector context;
9 constructor •(final mock::Context context) → dynamic 8 constructor •(final Vector context) → dynamic
10 : self::Closure#main#function::context = context 9 : self::Closure#main#function::context = context
11 ; 10 ;
12 method call() → dynamic { 11 method call() → dynamic {
13 "This is a temporary solution. In the VM, this will become an additional par ameter."; 12 "This is a temporary solution. In the VM, this will become an additional par ameter.";
14 final mock::Context #contextParameter = this.{self::Closure#main#function::c ontext}; 13 final Vector #contextParameter = this.{self::Closure#main#function::context} ;
15 core::print(#contextParameter.[](0)); 14 core::print(#contextParameter[1]);
16 if(!#contextParameter.[](1).==(null)) 15 if(!(#contextParameter[2]).==(null))
17 core::print(#contextParameter.[](1)); 16 core::print(#contextParameter[2]);
18 } 17 }
19 } 18 }
20 static method main() → dynamic { 19 static method main() → dynamic {
21 dynamic c; 20 dynamic c;
22 try { 21 try {
23 throw "Fisk"; 22 throw "Fisk";
24 } 23 }
25 on core::String catch(dynamic #t1, dynamic #t2) { 24 on core::String catch(dynamic #t1, dynamic #t2) {
26 final mock::Context #context = new mock::Context::•(2); 25 final Vector #context = MakeVector(3);
27 #context.[]=(0, #t1); 26 #context[1] = #t1;
28 #context.[]=(1, #t2); 27 #context[2] = #t2;
29 c = new self::Closure#main#function::•(#context); 28 c = new self::Closure#main#function::•(#context);
30 } 29 }
31 c.call(); 30 c.call();
32 core::print("TEST PASSED"); 31 core::print("TEST PASSED");
33 } 32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698