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

Side by Side Diff: test/codegen/expect/language/try_catch_optimized3_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_optimized3_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__try_catch_optimized3_test(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const dart = dart_sdk.dart;
8 const dartx = dart_sdk.dartx;
9 const expect$ = expect.expect;
10 const try_catch_optimized3_test = Object.create(null);
11 let boolTodynamic = () => (boolTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [core.bool])))();
12 let doubleAndboolTodynamic = () => (doubleAndboolTodynamic = dart.constFn(dart .definiteFunctionType(dart.dynamic, [core.double, core.bool])))();
13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
14 try_catch_optimized3_test.foo = function(b) {
15 if (dart.test(b)) dart.throw(123);
16 };
17 dart.fn(try_catch_optimized3_test.foo, boolTodynamic());
18 try_catch_optimized3_test.test_double = function(x, b) {
19 try {
20 x = dart.notNull(x) + 1.0;
21 try_catch_optimized3_test.foo(b);
22 } catch (e) {
23 let result = dart.notNull(x) - 1.0;
24 expect$.Expect.equals(1.0, result);
25 return result;
26 }
27
28 };
29 dart.fn(try_catch_optimized3_test.test_double, doubleAndboolTodynamic());
30 try_catch_optimized3_test.main = function() {
31 for (let i = 0; i < 100; i++)
32 try_catch_optimized3_test.test_double(1.0, false);
33 try_catch_optimized3_test.test_double(1.0, false);
34 expect$.Expect.equals(1.0, try_catch_optimized3_test.test_double(1.0, true)) ;
35 };
36 dart.fn(try_catch_optimized3_test.main, VoidTodynamic());
37 // Exports:
38 exports.try_catch_optimized3_test = try_catch_optimized3_test;
39 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/try_catch_optimized2_test.js ('k') | test/codegen/expect/language/try_catch_optimized4_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698