From a5c5b8fac882b230fd72e7a9255627a4ee5fa27a Mon Sep 17 00:00:00 2001 From: Yingbo Ma Date: Wed, 19 Oct 2022 16:02:50 -0400 Subject: [PATCH] Add test --- test/reduction.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/reduction.jl b/test/reduction.jl index c0f22df73c..e534c7aa30 100644 --- a/test/reduction.jl +++ b/test/reduction.jl @@ -295,3 +295,10 @@ eqs = [x ~ 0 ss = alias_elimination(sys) @test isempty(equations(ss)) @test sort(observed(ss), by = string) == ([D(x), x, y] .~ 0) + +eqs = [D(D(x)) ~ -x] +@named sys = ODESystem(eqs, t, [x], []) +ss = alias_elimination(sys) +@test length(equations(ss)) == length(states(ss)) == 1 +ss = structural_simplify(sys) +@test length(equations(ss)) == length(states(ss)) == 2