diff --git a/src/Bijectors.jl b/src/Bijectors.jl index df7e3db0..e449794e 100644 --- a/src/Bijectors.jl +++ b/src/Bijectors.jl @@ -137,7 +137,7 @@ julia> d = LogNormal() # support is (0, Inf) LogNormal{Float64}(μ=0.0, σ=1.0) julia> b = bijector(d) # log function transforms to unconstrained space -(::Base.Fix1{typeof(broadcast), typeof(log)}) (generic function with 1 method) +(::Base.Fix1{typeof(broadcast), typeof(log)}) (generic function with 3 methods) julia> b(1.0) 0.0 diff --git a/test/Project.toml b/test/Project.toml index 3fe1adbc..dcfd3442 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -5,6 +5,7 @@ ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a" ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" DistributionsAD = "ced4e74d-a319-5a8a-b0ac-84af2272839c" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" EnzymeTestUtils = "12d8515a-0907-448a-8884-5fe00fdf1c5a" FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" @@ -21,6 +22,7 @@ Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" +StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" diff --git a/test/runtests.jl b/test/runtests.jl index c66f4c3f..c07404af 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -3,6 +3,7 @@ using Bijectors using ChainRulesTestUtils using Combinatorics using DistributionsAD +using Documenter: Documenter using Enzyme using EnzymeTestUtils using FiniteDifferences @@ -54,6 +55,18 @@ if GROUP == "All" || GROUP == "Interface" include("bijectors/product_bijector.jl") include("distributionsad.jl") + + @testset "doctests" begin + Documenter.DocMeta.setdocmeta!( + Bijectors, :DocTestSetup, :(using Bijectors); recursive=true + ) + doctestfilters = [ + # Ignore the source of a warning in the doctest output, since this is dependent + # on host. This is a line that starts with "└ @ " and ends with the line number. + r"└ @ .+:[0-9]+", + ] + Documenter.doctest(Bijectors; manual=false, doctestfilters=doctestfilters) + end end if GROUP == "All" || GROUP == "AD"