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

Unified Diff: tests/language/bit_shift_test.dart

Issue 1338233002: Fix right shifting of a Mint value by an amount larger than 63. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/integers.cc ('k') | tests/language/regress_24283_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/bit_shift_test.dart
diff --git a/tests/language/bit_shift_test.dart b/tests/language/bit_shift_test.dart
index 3032736d2a0b9f34eeb414116682559eb37d66b5..e939e5a49163a820f711563c029027a22d879ff1 100644
--- a/tests/language/bit_shift_test.dart
+++ b/tests/language/bit_shift_test.dart
@@ -7,6 +7,8 @@ import "package:expect/expect.dart";
constants() {
Expect.equals(0, 499 >> 33);
Expect.equals(0, (499 << 33) & 0xFFFFFFFF);
+ Expect.equals(0, (499 << 32) >> 65);
+ Expect.equals(0, ((499 << 32) << 65) & 0xFFFFFFFFFFFFFFFF);
}
foo(i) {
@@ -29,13 +31,18 @@ id(x) {
interceptors() {
Expect.equals(0, id(499) >> 33);
Expect.equals(0, (id(499) << 33) & 0xFFFFFFFF);
+ Expect.equals(0, id(499 << 32) >> 65);
+ Expect.equals(0, (id(499 << 32) << 65) & 0xFFFFFFFFFFFFFFFF);
}
speculative() {
var a = id(499);
+ var b = id(499 << 32);
for (int i = 0; i < 1; i++) {
Expect.equals(0, a >> 33);
Expect.equals(0, (a << 33) & 0xFFFFFFFF);
+ Expect.equals(0, b >> 65);
+ Expect.equals(0, (b << 65) & 0xFFFFFFFFFFFFFFFF);
}
}
« no previous file with comments | « runtime/lib/integers.cc ('k') | tests/language/regress_24283_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698