Skip to content

Commit af3e6d3

Browse files
authored
fix tests
1 parent fb17d4e commit af3e6d3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/gamma_test.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
for (T, max) in ((Float16, 13), (Float32, 43), (Float64, 170))
2-
x = rand(T, 10000)*max
3-
@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)
2+
v = rand(T, 10000)*max
3+
for x in v
4+
@test T(SpecialFunctions.gamma(widen(x))) Bessels.gamma(x)
5+
if isinteger(x)
6+
@test_throws DomainError Bessels.gamma(-x)
7+
else
8+
@test T(SpecialFunctions.gamma(widen(-x))) Bessels.gamma(-x)
9+
end
810
end
911
@test isnan(Bessels.gamma(T(NaN)))
1012
@test isinf(Bessels.gamma(T(Inf)))

0 commit comments

Comments
 (0)