Skip to content

Commit 81faac4

Browse files
committed
Correcting new test
1 parent d6c0649 commit 81faac4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/odesystem.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,18 @@ let
370370
δ = Differential(t)
371371

372372
eqs = [δ(x) ~ ẋ, δ(ẋ) ~ f - k*x - d*ẋ]
373-
sys = ODESystem(eqs, t, [x, ẋ], [f, d, k])
373+
sys = ODESystem(eqs, t, [x, ẋ], [f, d, k]; controls = [f])
374374

375375
calculate_control_jacobian(sys)
376376

377377
@test isequal(
378-
sys.ctrl_jac,
379-
Num[0, 1]
378+
ModelingToolkit.get_ctrl_jac(sys)[][1],
379+
reshape(Num[0,1], 2, 1)
380+
)
381+
382+
@test isequal(
383+
ModelingToolkit.get_ctrl_jac(sys)[][1],
384+
calculate_control_jacobian(sys)
380385
)
381386

382387
end

0 commit comments

Comments
 (0)