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

Side by Side Diff: test/codegen/expect/language/try_catch_optimized4_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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 dart_library.library('language/try_catch_optimized4_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__try_catch_optimized4_test(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const _interceptors = dart_sdk._interceptors;
8 const dart = dart_sdk.dart;
9 const dartx = dart_sdk.dartx;
10 const expect$ = expect.expect;
11 const try_catch_optimized4_test = Object.create(null);
12 let JSArrayOfObject = () => (JSArrayOfObject = dart.constFn(_interceptors.JSAr ray$(core.Object)))();
13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
14 dart.defineLazy(try_catch_optimized4_test, {
15 get a() {
16 return JSArrayOfObject().of([1, 2, 3, 4, 5]);
17 },
18 set a(_) {}
19 });
20 try_catch_optimized4_test.MyError = class MyError extends core.Object {};
21 try_catch_optimized4_test.M = class M extends core.Object {
22 maythrow(i) {
23 try {
24 if (dart.test(dart.dsend(i, '<=', 5))) dart.throw(new try_catch_optimize d4_test.MyError());
25 } catch (e) {
26 dart.throw(e);
27 }
28
29 }
30 };
31 dart.setSignature(try_catch_optimized4_test.M, {
32 methods: () => ({maythrow: dart.definiteFunctionType(dart.dynamic, [dart.dyn amic])})
33 });
34 try_catch_optimized4_test.loop_test = function() {
35 let failed = false;
36 let m = new try_catch_optimized4_test.M();
37 for (let i of try_catch_optimized4_test.a) {
38 try {
39 let res = core.String._check(m.maythrow(i));
40 failed = true;
41 } catch (e) {
42 if (try_catch_optimized4_test.MyError.is(e)) {
43 } else
44 throw e;
45 }
46
47 if (!core.identical(failed, false)) {
48 expect$.Expect.fail("");
49 }
50 }
51 };
52 dart.fn(try_catch_optimized4_test.loop_test, VoidTodynamic());
53 try_catch_optimized4_test.main = function() {
54 for (let i = 0; i < 20; i++)
55 try_catch_optimized4_test.loop_test();
56 };
57 dart.fn(try_catch_optimized4_test.main, VoidTodynamic());
58 // Exports:
59 exports.try_catch_optimized4_test = try_catch_optimized4_test;
60 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/try_catch_optimized3_test.js ('k') | test/codegen/expect/language/try_catch_osr_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698