Skip to content

Commit ee9ee8a

Browse files
test: update tests to account for changes to array hack
1 parent 6d9e49b commit ee9ee8a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/initializationsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,8 +1347,8 @@ end
13471347
guesses = [p[1] => q, p[2] => 2q])
13481348
@test ModelingToolkit.is_parameter_solvable(p, Dict(), defaults(sys), guesses(sys))
13491349
prob = ODEProblem(sys, [x => 1.0], (0.0, 1.0), [q => 2.0])
1350-
@test length(ModelingToolkit.observed(prob.f.initialization_data.initializeprob.f.sys)) ==
1351-
3
1350+
initsys = prob.f.initialization_data.initializeprob.f.sys
1351+
@test length(ModelingToolkit.observed(initsys)) == 4
13521352
sol = solve(prob, Tsit5())
13531353
@test sol.ps[p] [2.0, 4.0]
13541354
end

test/reduction.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ A = reshape(1:(N^2), N, N)
176176
eqs = xs ~ A * xs
177177
@named sys′ = NonlinearSystem(eqs, [xs], [])
178178
sys = structural_simplify(sys′)
179-
@test length(equations(sys)) == 3 && length(observed(sys)) == 2
179+
@test length(equations(sys)) == 3 && length(observed(sys)) == 3
180180

181181
# issue 958
182182
@parameters k₁ k₂ k₋₁ E₀

test/structural_transformation/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ end
7676
end
7777
@mtkbuild sys = ODESystem([D(x) ~ y[1] + y[2], y ~ foo(x)], t)
7878
@test length(equations(sys)) == 1
79-
@test length(observed(sys)) == 3
79+
@test length(observed(sys)) == 4
8080
prob = ODEProblem(sys, [x => 1.0], (0.0, 1.0), [foo => _tmp_fn2])
8181
val[] = 0
8282
@test_nowarn prob.f(prob.u0, prob.p, 0.0)

0 commit comments

Comments
 (0)