Skip to content

Commit 6dcbab0

Browse files
test: update tests to account for new alias elimination behavior
1 parent 7d32637 commit 6dcbab0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/initializationsystem.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,14 +455,13 @@ sol = solve(prob, Tsit5())
455455
# Initialize with an observed variable
456456
prob = ODEProblem(simpsys, [z => 0.0], tspan, guesses = [x => 2.0, y => 4.0])
457457
sol = solve(prob, Tsit5())
458-
@test sol.u[1] == [0.0, 0.0]
458+
@test sol[z, 1] == 0.0
459459

460460
prob = ODEProblem(simpsys, [z => 1.0, y => 1.0], tspan, guesses = [x => 2.0])
461461
sol = solve(prob, Tsit5())
462462
@test sol[[x, y], 1] == [0.0, 1.0]
463463

464-
# This should warn, but logging tests can't be marked as broken
465-
@test_logs prob = ODEProblem(simpsys, [], tspan, guesses = [x => 2.0])
464+
@test_warn "underdetermined" prob = ODEProblem(simpsys, [], tspan, guesses = [x => 2.0, y => 1.0])
466465

467466
# Late Binding initialization_eqs
468467
# https://github.com/SciML/ModelingToolkit.jl/issues/2787

0 commit comments

Comments
 (0)