Skip to content

Commit 6686524

Browse files
test: update mtkparameters tests with new portion
1 parent 25d52da commit 6686524

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/mtkparameters.jl

+5-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ setp(sys, a)(ps, 1.0)
4040

4141
@test getp(sys, a)(ps) == getp(sys, b)(ps) / 2 == getp(sys, c)(ps) / 3 == 1.0
4242

43-
for (portion, values) in [(Tunable(), [1.0, 2.0, 5.0, 6.0, 7.0])
43+
for (portion, values) in [(Tunable(), [1.0, 5.0, 6.0, 7.0])
4444
(Discrete(), [3.0])
4545
(Constants(), vcat([0.1, 0.2, 0.3], ones(9), [4.0]))]
4646
buffer, repack, alias = canonicalize(portion, ps)
@@ -109,7 +109,7 @@ eq = D(X) ~ p[1] - p[2] * X
109109
u0 = [X => 1.0]
110110
ps = [p => [2.0, 0.1]]
111111
p = MTKParameters(osys, ps, u0)
112-
@test p.tunable == [2.0, 0.1, 1.0]
112+
@test p.tunable == [2.0, 0.1]
113113

114114
# Ensure partial update promotes the buffer
115115
@parameters p q r
@@ -298,7 +298,7 @@ end
298298
end
299299

300300
# Parameter timeseries
301-
ps = MTKParameters(([1.0, 1.0],), (BlockedArray(zeros(4), [2, 2]),),
301+
ps = MTKParameters([1.0, 1.0], (), (BlockedArray(zeros(4), [2, 2]),),
302302
(), (), ())
303303
ps2 = SciMLStructures.replace(Discrete(), ps, ones(4))
304304
@test typeof(ps2.discrete) == typeof(ps.discrete)
@@ -314,7 +314,8 @@ with_updated_parameter_timeseries_values(
314314

315315
# With multiple types and clocks
316316
ps = MTKParameters(
317-
(), (BlockedArray([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], [3, 3]),
317+
(), (),
318+
(BlockedArray([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], [3, 3]),
318319
BlockedArray(falses(1), [1, 0])),
319320
(), (), ())
320321
@test SciMLBase.get_saveable_values(sys, ps, 1).x isa Tuple{Vector{Float64}, Vector{Bool}}

0 commit comments

Comments
 (0)