Skip to content

Commit 8cedc09

Browse files
devmotionandreasnoack
authored andcommitted
Add tests
(cherry picked from commit b8f3057)
1 parent d0ea52e commit 8cedc09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/gamma_inc.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ end
180180
@test_throws ArgumentError("p + q must equal one but is 1.02") gamma_inc_inv(T(1.0), T(0.1), T(0.92))
181181
@test_throws ArgumentError("p + q must equal one but is 1.02") gamma_inc_inv(T(1.0), T(0.92), T(0.1))
182182
end
183+
184+
@testset "Promotion of arguments" begin
185+
@test @inferred(gamma_inc_inv(1//2, 0.3f0, 0.7f0)) isa Float32
186+
@test @inferred(gamma_inc_inv(1, 0.2f0, 0.8f0)) isa Float32
187+
end
183188
end
184189

185190
double(x::Real) = Float64(x)

0 commit comments

Comments
 (0)