Skip to content

Commit

Permalink
move outside more
Browse files Browse the repository at this point in the history
  • Loading branch information
tpapp committed Oct 27, 2023
1 parent 3339875 commit 65f5333
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/methods.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""
Wrapper used in test set “do not require f::Function” below, moved outside so that it
works on Julia 1.0.
"""
struct NotAFunction end # not <: Function on purpose, cf #224
(::NotAFunction)(x) = abs2(x)

@testset "Methods" begin
@testset "Correctness" begin
# Finite difference methods to test.
Expand Down Expand Up @@ -163,8 +170,6 @@
end
end

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

0 comments on commit 65f5333

Please sign in to comment.