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

Side by Side Diff: tests/standalone/constant_left_shift_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 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 | Annotate | Revision Log
« no previous file with comments | « tests/standalone/byte_array_test.dart ('k') | tests/standalone/crypto/base64_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Dart test program for testing left shifts of a constant. 5 // Dart test program for testing left shifts of a constant.
6 6
7 import "package:expect/expect.dart";
8
9 shiftLeft0(c) => 0 << c; 7 shiftLeft0(c) => 0 << c;
10 shiftLeft1(c) => 1 << c; 8 shiftLeft1(c) => 1 << c;
11 shiftLeft8448(c) => 8448 << c; 9 shiftLeft8448(c) => 8448 << c;
12 10
13 shiftLeftNeg1(c) => -1 << c; 11 shiftLeftNeg1(c) => -1 << c;
14 shiftLeftNeg8448(c) => -8448 << c; 12 shiftLeftNeg8448(c) => -8448 << c;
15 13
16 main() { 14 main() {
17 // Optimize shifts. 15 // Optimize shifts.
18 for (int i = 0; i < 6000; i++) { 16 for (int i = 0; i < 6000; i++) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Deoptimize on 32-bit. 69 // Deoptimize on 32-bit.
72 Expect.equals(-1107296256, shiftLeftNeg8448(17)); 70 Expect.equals(-1107296256, shiftLeftNeg8448(17));
73 Expect.equals(-2214592512, shiftLeftNeg8448(18)); 71 Expect.equals(-2214592512, shiftLeftNeg8448(18));
74 Expect.equals(-1188950301625810944, shiftLeftNeg8448(47)); 72 Expect.equals(-1188950301625810944, shiftLeftNeg8448(47));
75 Expect.equals(-2377900603251621888, shiftLeftNeg8448(48)); 73 Expect.equals(-2377900603251621888, shiftLeftNeg8448(48));
76 // Deoptimize on 64 bits. 74 // Deoptimize on 64 bits.
77 Expect.equals(-4755801206503243776, shiftLeftNeg8448(49)); 75 Expect.equals(-4755801206503243776, shiftLeftNeg8448(49));
78 Expect.equals(-9511602413006487552, shiftLeftNeg8448(50)); 76 Expect.equals(-9511602413006487552, shiftLeftNeg8448(50));
79 } 77 }
80 78
OLDNEW
« no previous file with comments | « tests/standalone/byte_array_test.dart ('k') | tests/standalone/crypto/base64_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698