Skip to content

Commit b8f3057

Browse files
authored
Add tests
1 parent 08e95f7 commit b8f3057

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
@@ -173,6 +173,11 @@ end
173173
@test_throws ArgumentError("p + q must equal one but is 1.02") gamma_inc_inv(T(1.0), T(0.1), T(0.92))
174174
@test_throws ArgumentError("p + q must equal one but is 1.02") gamma_inc_inv(T(1.0), T(0.92), T(0.1))
175175
end
176+
177+
@testset "Promotion of arguments" begin
178+
@test @inferred(gamma_inc_inv(1//2, 0.3f0, 0.7f0)) isa Float32
179+
@test @inferred(gamma_inc_inv(1, 0.2f0, 0.8f0)) isa Float32
180+
end
176181
end
177182

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

0 commit comments

Comments
 (0)