Skip to content

Commit

Permalink
move DocTestSetup out of docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonschaub committed Feb 10, 2020
1 parent a89c515 commit aecc643
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using OptionalArgChecks
using Documenter

DocMeta.setdocmeta!(OptionalArgChecks, :DocTestSetup, :(using OptionalArgChecks); recursive=true)

makedocs(;
modules=[OptionalArgChecks],
authors="Simeon Schaub",
Expand Down
1 change: 0 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
```@meta
CurrentModule = OptionalArgChecks
DocTestSetup = :(using OptionalArgChecks)
```

# OptionalArgChecks
Expand Down
3 changes: 0 additions & 3 deletions src/OptionalArgChecks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ export @argcheck, @skipargcheck
Marks `ex` as an optional argument check, so when a function is called via
[`@skipargcheck`](@ref), `ex` will be omitted.
```@meta
DocTestSetup = :(using OptionalArgChecks)
```
```jldoctest
julia> function half(x::Integer)
@argcheck iseven(x) || throw(DomainError(x, "x has to be an even number"))
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ for x in 0:2
end

using Documenter

DocMeta.setdocmeta!(OptionalArgChecks, :DocTestSetup, :(using OptionalArgChecks); recursive=true)
doctest(OptionalArgChecks; manual = false)

0 comments on commit aecc643

Please sign in to comment.