blob: 29e5b34e4ef1c5e28a66ab54e53eed0f1390041f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
diff --git a/test/gmp.jl b/test/gmp.jl
index 8f6be13c38054..6efc349ca2ba1 100644
--- a/test/gmp.jl
+++ b/test/gmp.jl
@@ -11,6 +11,11 @@ ee = typemax(Int64)
@test BigInt <: Signed
@test big(1) isa Signed
+ if sizeof(Culong) >= 8
+ @test_throws OutOfMemoryError big(96608869069402268615522366320733234710)^16374500563449903721
+ @test_throws OutOfMemoryError 555555555555555555555555555555555555555555555555555^55555555555555555
+ end
+
let x = big(1)
@test signed(x) === x
@test convert(Signed, x) === x
|