Skip to content

Commit

Permalink
tests conversion + add to runtests.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
jaksle committed Dec 3, 2023
1 parent 768b727 commit 21f1790
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/conversion.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
using Test

using Distributions

@test convert(Binomial, Bernoulli(0.75)) == Binomial(1, 0.75)

@test convert(Gamma, Exponential(3.0)) == Gamma(1.0, 3.0)
@test convert(Gamma, Erlang(5, 2.0)) == Gamma(5.0, 2.0)


@test convert(Stable, Normal(42., 2.)) Stable(2., 0., 2, 42.)
@test convert(Stable, Cauchy(7., 13.)) == Stable(1., 0., 13., 7.)
@test convert(Stable, Levy(3., 5.)) == Stable(0.5, 1., 5., 3.)
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const tests = [
"univariate/continuous/lindley",
"univariate/continuous/logistic",
"univariate/continuous/noncentralchisq",
"univariate/continuous/stable",
"univariate/continuous/weibull",
"pdfnorm",
"univariate/continuous/rician",
Expand Down

0 comments on commit 21f1790

Please sign in to comment.