Skip to content

Commit 1e367f3

Browse files
test: make reduction test not depend on printing
1 parent 214f920 commit 1e367f3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/reduction.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,8 @@ eqs = [
338338
@named sys = System(eqs, t, [x, y], [])
339339
ss = mtkcompile(sys)
340340
@test isempty(equations(ss))
341-
@test sort(string.(observed(ss))) == [
342-
"x(t) ~ 0"
343-
"xˍt(t) ~ 0"
344-
"y(t) ~ xˍt(t) - x(t)"
345-
]
341+
dx = ModelingToolkit.default_toterm(unwrap(D(x)))
342+
@test issetequal(observed(ss), [x ~ 0, dx ~ 0, y ~ dx - x])
346343

347344
eqs = [D(D(x)) ~ -x]
348345
@named sys = System(eqs, t, [x], [])

0 commit comments

Comments
 (0)