Skip to content

Commit 62df70d

Browse files
test: fix parameter initialization test
1 parent fa43296 commit 62df70d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/upstream/mtk_structure_indexing.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,17 @@ let
353353
prob6 = remake(prob1, u0 = [Y2 => 40.0], p = [k1 => 0.4])
354354
prob7 = remake(prob1, u0 = [X1 => 10.0, X2 => 20.0], p = [V0 => 50.0])
355355
prob8 = remake(prob1, u0 = [W => 60.0])
356-
prob9 = remake(prob2; p ==> [10.0, 20.0]])
357-
prob10 = remake(prob1; u0 = [Y1 => 20.0], p ==> [20.0, 30.0], k1 => 0.4])
356+
prob9 = remake(prob2; u0 = [X2 => nothing, Y2 => nothing],
357+
p ==> [10.0, 20.0]])
358+
prob10 = remake(prob1; u0 = [Y1 => 20.0, Y2 => nothing, X2 => nothing],
359+
p ==> [20.0, 30.0], k1 => 0.4])
358360
prob11 = remake(prob10, u0 = [X1 => 10.0], p = [k2 => 0.5])
359361

360362
# Creates a testing function.
361363
function test_vals(prob, us_correct::Dict, ps_correct::Dict)
362364
integ = init(prob, solver)
363365
sol = solve(prob, solver)
366+
@test SciMLBase.successful_retcode(sol)
364367
for u in keys(us_correct)
365368
@test prob[u] == us_correct[u]
366369
@test integ[u] == us_correct[u]
@@ -399,9 +402,6 @@ let
399402
test_vals(prob8,
400403
Dict(X1 => 1.0, X2 => 2.0, Y1 => 3.0, Y2 => 4.0, V => 3.0, W => 60.0),
401404
Dict(k1 => 0.1, k2 => 0.2, V0 => 3.0, v => 3.0, w => 60.0, Γ[1] => 3.0, Γ[2] => 7.0))
402-
test_vals(prob8,
403-
Dict(X1 => 1.0, X2 => 2.0, Y1 => 3.0, Y2 => 4.0, V => 3.0, W => 60.0),
404-
Dict(k1 => 0.1, k2 => 0.2, V0 => 3.0, v => 3.0, w => 60.0, Γ[1] => 3.0, Γ[2] => 7.0))
405405
test_vals(prob9,
406406
Dict(X1 => 10.0, X2 => 0.0, Y1 => 3.0, Y2 => 17.0, V => 3.0, W => 6.0),
407407
Dict(k1 => 0.1, k2 => 0.2, V0 => 3.0, v => 3.0, w => 6.0, Γ[1] => 10.0, Γ[2] => 20.0))

0 commit comments

Comments
 (0)