Skip to content

Commit 547c3ff

Browse files
test: update tests to account for eager initialization
1 parent 2210139 commit 547c3ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/initializationsystem.jl

+4-2
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,8 @@ end
720720
@parameters x0 y0
721721
@mtkbuild sys = ODESystem([x ~ x0, y ~ y0, s ~ x + y], t; guesses = [y0 => 0.0])
722722
prob = ODEProblem(sys, [s => 1.0], (0.0, 1.0), [x0 => 0.3, y0 => missing])
723-
@test prob.ps[y0] 0.0
723+
# trivial initialization run immediately
724+
@test prob.ps[y0] 0.7
724725
@test init(prob, Tsit5()).ps[y0] 0.7
725726
@test solve(prob, Tsit5()).ps[y0] 0.7
726727
end
@@ -745,7 +746,8 @@ end
745746
systems = [fixed, spring, mass, gravity, constant, damper],
746747
guesses = [spring.s_rel0 => 1.0])
747748
prob = ODEProblem(sys, [], (0.0, 1.0), [spring.s_rel0 => missing])
748-
@test prob.ps[spring.s_rel0] 0.0
749+
# trivial initialization run immediately
750+
@test prob.ps[spring.s_rel0] -3.905
749751
@test init(prob, Tsit5()).ps[spring.s_rel0] -3.905
750752
@test solve(prob, Tsit5()).ps[spring.s_rel0] -3.905
751753
end

0 commit comments

Comments
 (0)