Skip to content

Commit 5bb05cd

Browse files
committed
Use @meta block for doctest setup in counterintuitive.md
1 parent 3736b5e commit 5bb05cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/src/counterintuitive.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
```@meta
2+
DocTestSetup = :(using StructArrays)
3+
```
14
# Some counterintuitive behaviors
25

36
When created from parent arrays representing each field of the final `struct`, StructArrays creates a "view" which
@@ -13,7 +16,7 @@ These issues are elucidated below.
1316

1417
For this demonstration, throughout we'll use this mutable struct:
1518

16-
```jldoctest counter1; setup=:(using StructArrays)
19+
```jldoctest counter1
1720
julia> mutable struct Foo{T}
1821
a::T
1922
b::T
@@ -181,7 +184,7 @@ None of the changes to `soa` "propagated" to `aos`. This is because a StructArra
181184
## Broadcasted assignment for array entries
182185

183186
Broadcasted in-place assignment can also behave counterintuitively for StructArrays.
184-
```jldoctest; setup=:(using StructArrays)
187+
```jldoctest
185188
julia> using StaticArrays # for FieldVector
186189
187190
julia> mutable struct Bar{T} <: FieldVector{2,T}

0 commit comments

Comments
 (0)