Skip to content

Commit fb17d4e

Browse files
authored
fix tests
1 parent bd753a9 commit fb17d4e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/gamma_test.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
for (T, max) in ((Float16, 13), (Float32, 43), (Float64, 170))
22
x = rand(T, 10000)*max
33
@test T.(SpecialFunctions.gamma.(widen.(x))) Bessels.gamma.(x)
4-
@test T.(SpecialFunctions.gamma.(widen.(-x))) Bessels.gamma.(-x)
4+
if isinteger(x)
5+
@test_throws DomainError Bessels.gamma.(-x)
6+
else
7+
@test T.(SpecialFunctions.gamma.(widen.(-x))) Bessels.gamma.(-x)
8+
end
59
@test isnan(Bessels.gamma(T(NaN)))
610
@test isinf(Bessels.gamma(T(Inf)))
711
end

0 commit comments

Comments
 (0)