Skip to content

Commit c4f22dc

Browse files
test: fix broken tearing test
1 parent fec62dc commit c4f22dc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/structural_transformation/tearing.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ graph2vars(graph) = map(is -> Set(map(i -> int2var[i], is)), graph.fadjlist)
5858
Set([u4])
5959
Set([u5])]
6060

61-
state = TearingState(tearing(sys))
62-
let sss = state.structure
63-
@unpack graph = sss
64-
@test graph2vars(graph) == [Set([u1, u2, u5])]
65-
end
61+
newsys = tearing(sys)
62+
@test length(equations(newsys)) == 1
63+
@test issetequal(ModelingToolkit.vars(equations(newsys)), [u1, u4, u5])
6664

6765
# Before:
6866
# u1 u2 u3 u4 u5

0 commit comments

Comments
 (0)