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

Side by Side Diff: tests/standalone/left_shift_bit_and_op_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/io/zlib_test.dart ('k') | tests/standalone/medium_integer_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Tests optimizing (a << b) & c if c is a Smi constant. 5 // Tests optimizing (a << b) & c if c is a Smi constant.
6 6
7 import "package:expect/expect.dart";
8
9 main() { 7 main() {
10 checkshiftAnd32(); 8 checkshiftAnd32();
11 checkShiftAnd64(); 9 checkShiftAnd64();
12 // Optimize shiftAnd32. 10 // Optimize shiftAnd32.
13 for (int i = 0; i < 10000; i++) { 11 for (int i = 0; i < 10000; i++) {
14 A.shiftAnd32(12, 17); 12 A.shiftAnd32(12, 17);
15 A.shiftAnd64(12, 17); 13 A.shiftAnd64(12, 17);
16 Expect.equals(72, A.multipleConstantUses(3, 4)); 14 Expect.equals(72, A.multipleConstantUses(3, 4));
17 Expect.equals(34493956096, A.multipleShiftUse(134742016, 8)); 15 Expect.equals(34493956096, A.multipleShiftUse(134742016, 8));
18 } 16 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 66 }
69 67
70 foo(x) { return x & 0xf; } 68 foo(x) { return x & 0xf; }
71 } 69 }
72 70
73 class B { foo(x) { return x; } } 71 class B { foo(x) { return x; } }
74 72
75 bar (o) { 73 bar (o) {
76 return o.foo(1 << 32); 74 return o.foo(1 << 32);
77 } 75 }
OLDNEW
« no previous file with comments | « tests/standalone/io/zlib_test.dart ('k') | tests/standalone/medium_integer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698