Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Oct 19, 2022
1 parent 4ee1990 commit a5c5b8f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/reduction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a5c5b8f

Please sign in to comment.