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

Unified Diff: tests/corelib/big_integer_arith_vm_test.dart

Issue 1198993003: - Split big integer tests into pieces. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: updated to ToT Created 5 years, 6 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 | « no previous file | tests/corelib/corelib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/big_integer_arith_vm_test.dart
diff --git a/tests/corelib/big_integer_arith_vm_test.dart b/tests/corelib/big_integer_arith_vm_test.dart
index 419e603d4c9cf840b9b6d15a36a3e9950d2d32e8..8b76ba0410d1a7bcb39e75f6a3ecfaeac193e13c 100644
--- a/tests/corelib/big_integer_arith_vm_test.dart
+++ b/tests/corelib/big_integer_arith_vm_test.dart
@@ -5,6 +5,7 @@
// Testing Bigints with and without intrinsics.
// VMOptions=
// VMOptions=--no_intrinsify
+// VMOptions=--optimization_counter_threshold=10
library big_integer_test;
import "package:expect/expect.dart";
@@ -396,24 +397,26 @@ testShiftAmount() {
}
main() {
- Expect.equals(1234567890123456789, foo());
- Expect.equals(12345678901234567890, bar());
- testSmiOverflow();
- testBigintAdd();
- testBigintSub();
- testBigintMul();
- testBigintTruncDiv();
- testBigintDiv();
- testBigintModulo();
- testBigintModPow();
- testBigintModInverse();
- testBigintGcd();
- testBigintNegate();
- testShiftAmount();
- Expect.equals(12345678901234567890, (12345678901234567890).abs());
- Expect.equals(12345678901234567890, (-12345678901234567890).abs());
- var a = 10000000000000000000;
- var b = 10000000000000000001;
- Expect.equals(false, a.hashCode == b.hashCode);
- Expect.equals(true, a.hashCode == (b - 1).hashCode);
+ for (int i = 0; i < 10; i++) {
+ Expect.equals(1234567890123456789, foo());
+ Expect.equals(12345678901234567890, bar());
+ testSmiOverflow(); /// overflow: ok
+ testBigintAdd(); /// add: ok
+ testBigintSub(); /// sub: ok
+ testBigintMul(); /// mul: ok
+ testBigintTruncDiv(); /// trunDiv: ok
+ testBigintDiv(); /// div: ok
+ testBigintModulo(); /// mod: ok
+ testBigintModPow(); /// modPow: ok
+ testBigintModInverse(); /// modInv: ok
+ testBigintGcd(); /// gcd: ok
+ testBigintNegate(); /// negate: ok
+ testShiftAmount(); /// shift: ok
+ Expect.equals(12345678901234567890, (12345678901234567890).abs());
+ Expect.equals(12345678901234567890, (-12345678901234567890).abs());
+ var a = 10000000000000000000;
+ var b = 10000000000000000001;
+ Expect.equals(false, a.hashCode == b.hashCode);
+ Expect.equals(true, a.hashCode == (b - 1).hashCode);
+ }
}
« no previous file with comments | « no previous file | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698