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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated latest tests. 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
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
7 shiftLeft0(c) => 0 << c; 9 shiftLeft0(c) => 0 << c;
8 shiftLeft1(c) => 1 << c; 10 shiftLeft1(c) => 1 << c;
9 shiftLeft8448(c) => 8448 << c; 11 shiftLeft8448(c) => 8448 << c;
10 12
11 shiftLeftNeg1(c) => -1 << c; 13 shiftLeftNeg1(c) => -1 << c;
12 shiftLeftNeg8448(c) => -8448 << c; 14 shiftLeftNeg8448(c) => -8448 << c;
13 15
14 main() { 16 main() {
15 // Optimize shifts. 17 // Optimize shifts.
16 for (int i = 0; i < 6000; i++) { 18 for (int i = 0; i < 6000; i++) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // Deoptimize on 32-bit. 71 // Deoptimize on 32-bit.
70 Expect.equals(-1107296256, shiftLeftNeg8448(17)); 72 Expect.equals(-1107296256, shiftLeftNeg8448(17));
71 Expect.equals(-2214592512, shiftLeftNeg8448(18)); 73 Expect.equals(-2214592512, shiftLeftNeg8448(18));
72 Expect.equals(-1188950301625810944, shiftLeftNeg8448(47)); 74 Expect.equals(-1188950301625810944, shiftLeftNeg8448(47));
73 Expect.equals(-2377900603251621888, shiftLeftNeg8448(48)); 75 Expect.equals(-2377900603251621888, shiftLeftNeg8448(48));
74 // Deoptimize on 64 bits. 76 // Deoptimize on 64 bits.
75 Expect.equals(-4755801206503243776, shiftLeftNeg8448(49)); 77 Expect.equals(-4755801206503243776, shiftLeftNeg8448(49));
76 Expect.equals(-9511602413006487552, shiftLeftNeg8448(50)); 78 Expect.equals(-9511602413006487552, shiftLeftNeg8448(50));
77 } 79 }
78 80
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698