Skip to content

Commit 37b727e

Browse files
committed
More tests
1 parent d2a0aa6 commit 37b727e

File tree

2 files changed

+254
-0
lines changed

2 files changed

+254
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@testset "CharacteristicIdealDiodes simulation (algebraic unknowns)" begin
2+
# This model has unknowns but all are algebraic (zero mass-matrix rows).
3+
# Regression test: Rodas5Pr returned Unstable when the saveat-grid fix
4+
# was only applied to models with no unknowns at all.
5+
model = "Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes"
6+
bmo_path = joinpath(FIXTURES, "$model.bmo")
7+
mktempdir() do tmpdir
8+
par_ok, _, par_err, ode_prob = run_parse(bmo_path, tmpdir, model)
9+
@test par_ok
10+
par_ok || @warn "Parse error: $par_err"
11+
12+
if par_ok
13+
sim_ok, _, sim_err, _ = run_simulate(ode_prob, tmpdir, model)
14+
@test sim_ok
15+
sim_ok || @warn "Simulation error: $sim_err"
16+
end
17+
end
18+
end

0 commit comments

Comments
 (0)