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

Side by Side Diff: test/codegen/expect/language/positive_bit_operations_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/positive_bit_operations_test', null, /* Imports * /[
2 'dart_sdk',
3 'expect'
4 ], function load__positive_bit_operations_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 positive_bit_operations_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun ctionType(dart.dynamic, [dart.dynamic])))();
13 positive_bit_operations_test.constants = function() {
14 expect$.Expect.equals(2147483648, (2147483648 | 0) >>> 0);
15 expect$.Expect.equals(2147483649, (2147483648 | 1) >>> 0);
16 expect$.Expect.equals(2147483648, (2147483648 | 2147483648) >>> 0);
17 expect$.Expect.equals(4294967295, (4294901760 | 65535) >>> 0);
18 expect$.Expect.equals(2147483648, (2147483648 & 4294967295) >>> 0);
19 expect$.Expect.equals(2147483648, (2147483648 & 2147483648) >>> 0);
20 expect$.Expect.equals(2147483648, (2147483648 & 4026531840) >>> 0);
21 expect$.Expect.equals(2147483648, (4294967295 & 2147483648) >>> 0);
22 expect$.Expect.equals(2147483648, (2147483648 ^ 0) >>> 0);
23 expect$.Expect.equals(4294967295, (2147483648 ^ 2147483647) >>> 0);
24 expect$.Expect.equals(4294967295, (2147483647 ^ 2147483648) >>> 0);
25 expect$.Expect.equals(4026531840, (1879048192 ^ 2147483648) >>> 0);
26 expect$.Expect.equals(2147483648, 1 << 31 >>> 0);
27 expect$.Expect.equals(4294967280, 268435455 << 4 >>> 0);
28 expect$.Expect.equals(2147483647, 4294967295 >>> 1);
29 expect$.Expect.equals(4294967292, (((268435455 << 4 >>> 0)[dartx['>>']](1) | 2147483648) >>> 2 ^ 1073741824) >>> 0 << 1 >>> 0);
30 };
31 dart.fn(positive_bit_operations_test.constants, VoidTodynamic());
32 positive_bit_operations_test.foo = function(i) {
33 if (!dart.equals(i, 0)) {
34 positive_bit_operations_test.y = dart.dsend(positive_bit_operations_test.y , '-', 1);
35 positive_bit_operations_test.foo(dart.dsend(i, '-', 1));
36 positive_bit_operations_test.y = dart.dsend(positive_bit_operations_test.y , '+', 1);
37 }
38 };
39 dart.fn(positive_bit_operations_test.foo, dynamicTodynamic());
40 positive_bit_operations_test.y = null;
41 positive_bit_operations_test.id = function(x) {
42 positive_bit_operations_test.y = x;
43 positive_bit_operations_test.foo(10);
44 return positive_bit_operations_test.y;
45 };
46 dart.fn(positive_bit_operations_test.id, dynamicTodynamic());
47 positive_bit_operations_test.interceptors = function() {
48 expect$.Expect.equals(2147483648, dart.dsend(positive_bit_operations_test.id (2147483648), '|', positive_bit_operations_test.id(0)));
49 expect$.Expect.equals(2147483649, dart.dsend(positive_bit_operations_test.id (2147483648), '|', positive_bit_operations_test.id(1)));
50 expect$.Expect.equals(2147483648, dart.dsend(positive_bit_operations_test.id (2147483648), '|', positive_bit_operations_test.id(2147483648)));
51 expect$.Expect.equals(4294967295, dart.dsend(positive_bit_operations_test.id (4294901760), '|', positive_bit_operations_test.id(65535)));
52 expect$.Expect.equals(2147483648, dart.dsend(positive_bit_operations_test.id (2147483648), '&', positive_bit_operations_test.id(4294967295)));
53 expect$.Expect.equals(2147483648, dart.dsend(positive_bit_operations_test.id (2147483648), '&', positive_bit_operations_test.id(2147483648)));
54 expect$.Expect.equals(2147483648, dart.dsend(positive_bit_operations_test.id (2147483648), '&', positive_bit_operations_test.id(4026531840)));
55 expect$.Expect.equals(2147483648, dart.dsend(positive_bit_operations_test.id (4294967295), '&', positive_bit_operations_test.id(2147483648)));
56 expect$.Expect.equals(2147483648, dart.dsend(positive_bit_operations_test.id (2147483648), '^', positive_bit_operations_test.id(0)));
57 expect$.Expect.equals(4294967295, dart.dsend(positive_bit_operations_test.id (2147483648), '^', positive_bit_operations_test.id(2147483647)));
58 expect$.Expect.equals(4294967295, dart.dsend(positive_bit_operations_test.id (2147483647), '^', positive_bit_operations_test.id(2147483648)));
59 expect$.Expect.equals(4026531840, dart.dsend(positive_bit_operations_test.id (1879048192), '^', positive_bit_operations_test.id(2147483648)));
60 expect$.Expect.equals(2147483648, dart.dsend(positive_bit_operations_test.id (1), '<<', positive_bit_operations_test.id(31)));
61 expect$.Expect.equals(4294967280, dart.dsend(positive_bit_operations_test.id (268435455), '<<', positive_bit_operations_test.id(4)));
62 expect$.Expect.equals(2147483647, dart.dsend(positive_bit_operations_test.id (4294967295), '>>', positive_bit_operations_test.id(1)));
63 expect$.Expect.equals(4294967292, dart.dsend(dart.dsend(dart.dsend(dart.dsen d(dart.dsend(dart.dsend(positive_bit_operations_test.id(268435455), '<<', 4), '> >', 1), '|', 2147483648), '>>', 2), '^', 1073741824), '<<', 1));
64 };
65 dart.fn(positive_bit_operations_test.interceptors, VoidTodynamic());
66 positive_bit_operations_test.speculative = function() {
67 let a = positive_bit_operations_test.id(2147483648);
68 let b = positive_bit_operations_test.id(0);
69 let c = positive_bit_operations_test.id(1);
70 let d = positive_bit_operations_test.id(4294901760);
71 let e = positive_bit_operations_test.id(65535);
72 let f = positive_bit_operations_test.id(4294967295);
73 let g = positive_bit_operations_test.id(4026531840);
74 let h = positive_bit_operations_test.id(2147483647);
75 let j = positive_bit_operations_test.id(1879048192);
76 let k = positive_bit_operations_test.id(31);
77 let l = positive_bit_operations_test.id(4);
78 let m = positive_bit_operations_test.id(268435455);
79 for (let i = 0; i < 1; i++) {
80 expect$.Expect.equals(2147483648, dart.dsend(a, '|', b));
81 expect$.Expect.equals(2147483649, dart.dsend(a, '|', c));
82 expect$.Expect.equals(2147483648, dart.dsend(a, '|', a));
83 expect$.Expect.equals(4294967295, dart.dsend(d, '|', e));
84 expect$.Expect.equals(2147483648, dart.dsend(a, '&', f));
85 expect$.Expect.equals(2147483648, dart.dsend(a, '&', a));
86 expect$.Expect.equals(2147483648, dart.dsend(a, '&', g));
87 expect$.Expect.equals(2147483648, dart.dsend(f, '&', a));
88 expect$.Expect.equals(2147483648, dart.dsend(a, '^', b));
89 expect$.Expect.equals(4294967295, dart.dsend(a, '^', h));
90 expect$.Expect.equals(4294967295, dart.dsend(h, '^', a));
91 expect$.Expect.equals(4026531840, dart.dsend(j, '^', a));
92 expect$.Expect.equals(2147483648, dart.dsend(c, '<<', k));
93 expect$.Expect.equals(4294967280, dart.dsend(m, '<<', l));
94 expect$.Expect.equals(2147483647, dart.dsend(f, '>>', c));
95 expect$.Expect.equals(4294967292, dart.dsend(dart.dsend(dart.dsend(dart.ds end(dart.dsend(dart.dsend(m, '<<', 4), '>>', 1), '|', 2147483648), '>>', 2), '^' , 1073741824), '<<', 1));
96 }
97 };
98 dart.fn(positive_bit_operations_test.speculative, VoidTodynamic());
99 positive_bit_operations_test.precedence = function() {
100 expect$.Expect.equals(2147483648, (-1 & 2147483648) >>> 0);
101 expect$.Expect.equals(2147483648, dart.dsend(positive_bit_operations_test.id (-1), '&', 2147483648));
102 expect$.Expect.equals(2147483648, ~~2147483648 >>> 0);
103 expect$.Expect.equals(2147483648, dart.dsend(dart.dsend(positive_bit_operati ons_test.id(2147483648), '~'), '~'));
104 };
105 dart.fn(positive_bit_operations_test.precedence, VoidTodynamic());
106 positive_bit_operations_test.main = function() {
107 positive_bit_operations_test.constants();
108 positive_bit_operations_test.interceptors();
109 positive_bit_operations_test.speculative();
110 positive_bit_operations_test.precedence();
111 };
112 dart.fn(positive_bit_operations_test.main, VoidTodynamic());
113 // Exports:
114 exports.positive_bit_operations_test = positive_bit_operations_test;
115 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698