Skip to content

Commit bd69475

Browse files
committed
Add out-of-range base tests
1 parent ba0839e commit bd69475

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/intfuncs.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ end
339339
@test digits(-3, base = 2) == -[1, 1]
340340
@test digits(-42, base = 4) == -[2, 2, 2]
341341

342+
@test_throws DomainError string(5, base = typemin(Int128) + 10)
343+
342344
@testset "digits/base with bases powers of 2" begin
343345
@test digits(4, base = 2) == [0, 0, 1]
344346
@test digits(5, base = Int32(2), pad=Int32(3)) == [1, 0, 1]

0 commit comments

Comments
 (0)