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 03246ba34325ca9b3eff900a3ad774158a4381a7..0d2f5169d92716b41127a62c6312869b99dadc5c 100644 |
--- a/tests/corelib/big_integer_arith_vm_test.dart |
+++ b/tests/corelib/big_integer_arith_vm_test.dart |
@@ -310,9 +310,33 @@ testBigintGcd() { |
Expect.equals(21 <<40, x.gcd(m)); |
x = 0; |
m = 1000000001; |
- Expect.throws(() => x.gcd(m), (e) => e is ArgumentError); |
+ Expect.equals(m, x.gcd(m)); |
x = 1000000001; |
m = 0; |
+ Expect.equals(x, x.gcd(m)); |
+ x = 0; |
+ m = -1000000001; |
+ Expect.equals(-m, x.gcd(m)); |
+ x = -1000000001; |
+ m = 0; |
+ Expect.equals(-x, x.gcd(m)); |
+ x = 0; |
+ m = 0; |
+ Expect.throws(() => x.gcd(m), (e) => e is ArgumentError); |
+ x = 0; |
+ m = 123456789012345678901234567890; |
+ Expect.equals(m, x.gcd(m)); |
+ x = 123456789012345678901234567890; |
+ m = 0; |
+ Expect.equals(x, x.gcd(m)); |
+ x = 0; |
+ m = -123456789012345678901234567890; |
+ Expect.equals(-m, x.gcd(m)); |
+ x = -123456789012345678901234567890; |
+ m = 0; |
+ Expect.equals(-x, x.gcd(m)); |
+ x = 0; |
+ m = 0; |
Expect.throws(() => x.gcd(m), (e) => e is ArgumentError); |
x = 1234567890; |
m = 19; |