Skip to content

Commit 65f5333

Browse files
committed
move outside more
1 parent 3339875 commit 65f5333

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/methods.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""
2+
Wrapper used in test set “do not require f::Function” below, moved outside so that it
3+
works on Julia 1.0.
4+
"""
5+
struct NotAFunction end # not <: Function on purpose, cf #224
6+
(::NotAFunction)(x) = abs2(x)
7+
18
@testset "Methods" begin
29
@testset "Correctness" begin
310
# Finite difference methods to test.
@@ -163,8 +170,6 @@
163170
end
164171
end
165172

166-
struct NotAFunction end # not <: Function on purpose, cf #224
167-
(::NotAFunction)(x) = abs2(x)
168173
@testset "do not require f::Function" begin
169174
x = 0.7
170175
for f in [forward_fdm, central_fdm, backward_fdm]

0 commit comments

Comments
 (0)