Skip to content

Commit 4b26a0e

Browse files
committed
forgot a test
1 parent cbb937e commit 4b26a0e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/coloring_tests.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,13 @@ y0 = [0.0, 0.0, 0.0, 0.0]
209209
cache = FiniteDiff.JacobianCache(copy(θ), copy(y0), copy(y0), Val(:forward); sparsity=[1 1 0; 1 1 0; 1 0 1; 1 0 0])
210210
FiniteDiff.finite_difference_jacobian!(J, _f4, θ, cache)
211211
@test J [-7.0 4.0 0; 2.0 -3.0 0.0; 13.3 0.0 -3.0; 1.0 0.0 0.0]
212+
213+
function _f5(dx, x)
214+
dx .= [x[1]^2 + x[2]^2]
215+
end
216+
J = zeros(1, 2)
217+
θ = [5.0, 3.0]
218+
y0 = [0.0]
219+
cache = FiniteDiff.JacobianCache(copy(θ), copy(y0), copy(y0), Val(:forward); sparsity = [1 1])
220+
FiniteDiff.finite_difference_jacobian!(J, _f5, θ, cache)
221+
@test J [10.0 6.0]

0 commit comments

Comments
 (0)