Skip to content

Commit b701a2d

Browse files
Merge pull request #1192 from thomvet/fix-tests-broken-by-SciMLBase1101
fixes tests that were broken by SciMLBase PR 1101
2 parents 1bc5db6 + c52088c commit b701a2d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/diffeqfunction_tests.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using DiffEqBase, Test, RecursiveArrayTools
2+
import SciMLBase: AbstractSciMLFunction
23

34
macro iop_def(funcdef::Expr)
45
"""Define in- and out-of-place functions simultaneously.
@@ -21,19 +22,19 @@ macro iop_def(funcdef::Expr)
2122
end
2223
end
2324

24-
function test_inplace(du, expected, f::Function, args...)
25+
function test_inplace(du, expected, f::AbstractSciMLFunction, args...)
2526
"""Test the in-place version of a function."""
2627
fill!(du, NaN)
2728
f(du, args...)
2829
@test du == expected
2930
end
3031

3132
# Allocate du automatically based on type of expected result
32-
function test_inplace(expected, f::Function, args...)
33+
function test_inplace(expected, f::AbstractSciMLFunction, args...)
3334
test_inplace(similar(expected), expected, f, args...)
3435
end
3536

36-
function test_iop(expected, f_op::Function, f_ip::Function, args...)
37+
function test_iop(expected, f_op::AbstractSciMLFunction, f_ip::AbstractSciMLFunction, args...)
3738
"""Test in- and out-of-place version of function both match expected value."""
3839
@test f_op(args...) == expected
3940
test_inplace(expected, f_ip, args...)

0 commit comments

Comments
 (0)