mmikhasenko / AlgebraPDF.jl

adding, multiplying density functions, fitting LLH
MIT License
17 stars 0 forks source link

enaglenable testing `jldoctest` #36

Open mmikhasenko opened 7 months ago

mmikhasenko commented 7 months ago

fix-type-piracy branch is trying to add a few jldoctests

It can be turned on by doctest=true argument in makedocs, see "docs/make.jl". Currently, it gives error.

Error: doctest failure in AlgebraPDF.jl\src\parameters.jl:11-23
│ 
│ ```jldoctest
│ julia> subtract((a=1,b=2,d=1,c=2), (d=1,))
│ (a=1,b=2,c=2)
│ 
│ julia> subtract((a=1,b=2,d=1,c=2), :d)
│ (a=1,b=2,c=2)
│ 
│ julia> subtract((a=1,b=2,d=1,c=2), [:d, :a])
│ (b=2,c=2)
│ 
│ julia> subtract((a=1,b=2,d=1,c=2), (:d, :a))
│ (b=2,c=2)
│ ```
│ 
│ Subexpression:
│ 
│ subtract((a=1,b=2,d=1,c=2), :d)
│ 
│ Evaluated output:
│ 
│ ERROR: UndefVarError: `subtract` not defined
│ Stacktrace:
│  [1] top-level scope
│    @ none:1
│ 
│ Expected output:
│ 
│ (a=1,b=2,c=2)
│ 
│   diff =
│    (a=1,b=2,c=2)ERROR: UndefVarError: `subtract` not defined
│    Stacktrace:
│     [1] top-level scope
│       @ none:1
└ @ Documenter AlgebraPDF.jl\src\parameters.jl:11
┌ Error: doctest failure in AlgebraPDF.jl\src\parameters.jl:11-23
│ 
│ ```jldoctest
│ julia> subtract((a=1,b=2,d=1,c=2), (d=1,))
│ (a=1,b=2,c=2)
│ 
│ julia> subtract((a=1,b=2,d=1,c=2), :d)
│ (a=1,b=2,c=2)
│ 
│ julia> subtract((a=1,b=2,d=1,c=2), [:d, :a])
│ (b=2,c=2)
│ 
│ julia> subtract((a=1,b=2,d=1,c=2), (:d, :a))
│ (b=2,c=2)
│ ```
│ 
│ Subexpression:
│ 
│ subtract((a=1,b=2,d=1,c=2), [:d, :a])
│ 
│ Evaluated output:
│ 
│ ERROR: UndefVarError: `subtract` not defined
│ Stacktrace:
│  [1] top-level scope
│    @ none:1
│ 
│ Expected output:
│ 
│ (b=2,c=2)
│ 
│   diff =
│    (b=2,c=2)ERROR: UndefVarError: `subtract` not defined
│    Stacktrace:
│     [1] top-level scope
│       @ none:1