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

Side by Side Diff: test/codegen/expect/language/value_range_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/value_range_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__value_range_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 value_range_test = Object.create(null);
11 let intToint = () => (intToint = dart.constFn(dart.definiteFunctionType(core.i nt, [core.int])))();
12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
13 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
14 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT ype(core.bool, [dart.dynamic])))();
15 value_range_test.inscrutable = function(x) {
16 return x == 0 ? 0 : (dart.notNull(x) | dart.notNull(value_range_test.inscrut able((dart.notNull(x) & dart.notNull(x) - 1) >>> 0))) >>> 0;
17 };
18 dart.fn(value_range_test.inscrutable, intToint());
19 let const$;
20 value_range_test.foo = function() {
21 let x = 258;
22 if (value_range_test.inscrutable(x) == 0) x = 0;
23 if (value_range_test.inscrutable(10) == 10) x = 16;
24 x = x & 255;
25 let a = const$ || (const$ = dart.constList([1, 2, 3], core.int));
26 return a[dartx.get](x);
27 };
28 dart.fn(value_range_test.foo, VoidTodynamic());
29 value_range_test.main = function() {
30 expect$.Expect.throws(dart.fn(() => value_range_test.foo(), VoidTovoid()), d art.fn(e => core.RangeError.is(e), dynamicTobool()));
31 };
32 dart.fn(value_range_test.main, VoidTodynamic());
33 // Exports:
34 exports.value_range_test = value_range_test;
35 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/value_range3_test.js ('k') | test/codegen/expect/language/var_init_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698