Skip to content

Commit

Permalink
test: fix IfLifting test
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Dec 24, 2024
1 parent 994b2db commit 1835a56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/if_lifting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ using ModelingToolkit: t_nounits as t, D_nounits as D, IfLifting, no_if_lift
@test operation(only(equations(ss2)).rhs) === ifelse

discvar = only(parameters(ss2))
prob2 = ODEProblem(ss2, [x => 0.0], (0.0, 5.0))
prob1 = ODEProblem(ss1, [ss1.x => 0.0], (0.0, 5.0))
sol1 = solve(prob1, Tsit5())
prob2 = ODEProblem(ss2, [ss2.x => 0.0], (0.0, 5.0))
sol2 = solve(prob2, Tsit5())
@test count(isapprox(pi), sol2.t) == 2
@test any(isapprox(pi), sol2.discretes[1].t)
Expand Down

0 comments on commit 1835a56

Please sign in to comment.