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

Unified Diff: tests/standalone/src/MediumIntegerTest.dart

Issue 9526001: Fix issue 1845: Mint BIT_AND Smi was incorrect for negative Smi-s. Jump to slow case on negative Sm… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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/vm/opt_code_generator_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/MediumIntegerTest.dart
===================================================================
--- tests/standalone/src/MediumIntegerTest.dart (revision 4726)
+++ tests/standalone/src/MediumIntegerTest.dart (working copy)
@@ -130,6 +130,13 @@
Expect.equals(4611686018427387904000000000000000000, a * b);
}
+ static testMintAnd(mint) {
+ // Issue 1845.
+ final int t = 0;
+ var res = mint & (t - 1);
+ Expect.equals(mint, res);
+ }
+
// TODO(srdjan): Add more tests.
static void testMain() {
@@ -140,6 +147,8 @@
testMintSub();
testMintMul();
testMintDiv();
+ testMintAnd(-1925149952);
+ testMintAnd(1925149952);
var a = 100000000000;
var b = 100000000001;
checkMint(a);
@@ -150,5 +159,7 @@
}
main() {
- MediumIntegerTest.testMain();
+ for (int i = 0; i < 1000; i++) {
+ MediumIntegerTest.testMain();
+ }
}
« no previous file with comments | « runtime/vm/opt_code_generator_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698