Skip to content

Commit

Permalink
check for SSAStepper
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacsas committed Nov 22, 2024
1 parent c6af99b commit c5bb612
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/upstream/mtk_structure_indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,18 @@ end
# Test solve's save_idxs argument.
# Currently, `save_idxs` is broken with symbolic stuff (https://github.com/SciML/ModelingToolkit.jl/issues/1761).
let
for (prob, solver) in zip(deepcopy([oprob, sprob, jprob]), [Tsit5(), ImplicitEM(), SSAStepper()])
for (prob, solver) in zip(deepcopy([oprob, sprob]), [Tsit5(), ImplicitEM(), SSAStepper()])

# Save single variable
@test solve(prob, solver; seed, save_idxs=X)[X][1] == 4
@test solve(prob, solver; seed, save_idxs=model.X)[X][1] == 4
@test solve(prob, solver; seed, save_idxs=:X)[X][1] == 4
if solver isa SSAStepper
@test solve(prob, solver; seed, save_idxs=X)[X][1] == 4
@test solve(prob, solver; seed, save_idxs=model.X)[X][1] == 4
@test solve(prob, solver; seed, save_idxs=:X)[X][1] == 4
else
@test_broken solve(prob, solver; seed, save_idxs=X)[X][1] == 4
@test_broken solve(prob, solver; seed, save_idxs=model.X)[X][1] == 4
@test_broken solve(prob, solver; seed, save_idxs=:X)[X][1] == 4
end

# Save observable.
@test_broken solve(prob, solver; seed, save_idxs=XY)[XY][1] == 9
Expand Down

0 comments on commit c5bb612

Please sign in to comment.