From 1835a56c04e138a2b4afd07bf3f25994bfb19e4c Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Tue, 24 Dec 2024 16:10:52 +0530 Subject: [PATCH] test: fix `IfLifting` test --- test/if_lifting.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/if_lifting.jl b/test/if_lifting.jl index d702355506..b72b468bf1 100644 --- a/test/if_lifting.jl +++ b/test/if_lifting.jl @@ -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)