Skip to content

Commit d756440

Browse files
Revert "test: update some tests to account for use_symbolic = true"
This reverts commit cff3906.
1 parent 8c714fc commit d756440

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

test/components.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ end
4242
completed_rc_model = complete(rc_model)
4343
@test isequal(completed_rc_model.resistor.n.i, resistor.n.i)
4444
@test ModelingToolkit.n_expanded_connection_equations(capacitor) == 2
45-
@test length(equations(structural_simplify(rc_model, allow_parameter = false))) == 1
45+
@test length(equations(structural_simplify(rc_model, allow_parameter = false))) == 2
4646
sys = structural_simplify(rc_model)
4747
@test_throws ModelingToolkit.RepeatedStructuralSimplificationError structural_simplify(sys)
4848
@test length(equations(sys)) == 1

test/implicit_discrete_system.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ rng = StableRNG(22525)
77

88
@testset "Correct ImplicitDiscreteFunction" begin
99
@variables x(t) = 1
10-
@mtkbuild sys = ImplicitDiscreteSystem([x(k) ~ abs(x(k)) * x(k - 1) - 3], t)
10+
@mtkbuild sys = ImplicitDiscreteSystem([x(k) ~ x(k) * x(k - 1) - 3], t)
1111
tspan = (0, 10)
1212

1313
# u[2] - u_next[1]

test/structural_transformation/index_reduction.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ let pss_pendulum = partial_state_selection(pendulum)
134134
end
135135

136136
let sys = structural_simplify(pendulum2)
137-
@test length(equations(sys)) == 4
138-
@test length(unknowns(sys)) == 4
137+
@test length(equations(sys)) == 5
138+
@test length(unknowns(sys)) == 5
139139

140140
u0 = [
141141
x => sqrt(2) / 2,

test/structural_transformation/utils.jl

+8-8
Original file line numberDiff line numberDiff line change
@@ -224,20 +224,20 @@ end
224224
xtt = default_toterm(unwrap(D(D(x))))
225225
@test mapping[x] == (0 ~ 1 - x^2 - y^2)
226226
@test mapping[y] == (D(y) ~ yt)
227-
@test mapping[D(y)] == (D(yt) ~ (2xtt * x + 2xt^2 + 2yt^2) / (-2y))
228-
@test mapping[D(x)] == (xt ~ -yt * y / x)
229-
@test mapping[D(D(x))] == (0 ~ -xtt + x * λ)
230-
@test length(mapping) == 6
227+
@test mapping[D(y)] == (D(yt) ~ -g + y * λ)
228+
@test mapping[D(x)] == (0 ~ -2xt * x - 2yt * y)
229+
@test mapping[D(D(x))] == (xtt ~ x * λ)
230+
@test length(mapping) == 5
231231

232232
@testset "`rename_dummy_derivatives = false`" begin
233233
mapping = map_variables_to_equations(sys; rename_dummy_derivatives = false)
234234

235235
@test mapping[x] == (0 ~ 1 - x^2 - y^2)
236236
@test mapping[y] == (D(y) ~ yt)
237-
@test mapping[yt] == (D(yt) ~ (2xtt * x + 2xt^2 + 2yt^2) / (-2y))
238-
@test mapping[xt] == (xt ~ -yt * y / x)
239-
@test mapping[xtt] == (0 ~ -xtt + x * λ)
240-
@test length(mapping) == 6
237+
@test mapping[yt] == (D(yt) ~ -g + y * λ)
238+
@test mapping[xt] == (0 ~ -2xt * x - 2yt * y)
239+
@test mapping[xtt] == (xtt ~ x * λ)
240+
@test length(mapping) == 5
241241
end
242242
end
243243
@testset "DDEs" begin

0 commit comments

Comments
 (0)