From e3fe89d9d1d2078a6cc882de6a701985265d6ef2 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 29 Sep 2021 06:49:30 +0200 Subject: [PATCH] Add tests for support of binomial distribution (#127) --- test/misc.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/misc.jl b/test/misc.jl index 4322d99..c72491c 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -55,3 +55,11 @@ end end end end + +# https://github.com/JuliaStats/StatsFuns.jl/issues/115 +@testset "support of binomial distribution" begin + @test iszero(binompdf(1, 0.5, prevfloat(1.0))) + @test iszero(binompdf(1, 0.5, nextfloat(1.0))) + @test binomlogpdf(1, 0.5, prevfloat(1.0)) == -Inf + @test binomlogpdf(1, 0.5, nextfloat(1.0)) == -Inf +end