Index: tests/language/bit_operations_test.dart |
=================================================================== |
--- tests/language/bit_operations_test.dart (revision 13286) |
+++ tests/language/bit_operations_test.dart (working copy) |
@@ -54,12 +54,13 @@ |
TestPositiveValueShifts(); |
TestNoMaskingOfShiftCount(); |
TestNegativeCountShifts(); |
- for (int i = 0; i < 1000; i++) { |
- TestCornerCasesLeftShifts(); |
+ for (int i = 0; i < 10000; i++) { |
+ TestCornerCasesRightShifts(); |
+ TestRightShift64Bit(); |
} |
} |
- static void TestCornerCasesLeftShifts() { |
+ static void TestCornerCasesRightShifts() { |
var v32 = 0xFF000000; |
var v64 = 0xFF00000000000000; |
Expect.equals(0x3, v32 >> 0x1E); |
@@ -70,6 +71,11 @@ |
Expect.equals(0x0, v64 >> 0x40); |
} |
+ static void TestRightShift64Bit() { |
+ var t = 0x1ffffffff; |
+ Expect.equals(0xffffffff, t >> 1); |
+ } |
+ |
static void TestNegativeCountShifts() { |
bool throwOnLeft(a, b) { |
try { |