Skip to content

Commit f923a4a

Browse files
committed
Nesting tests
1 parent 568fc6b commit f923a4a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/components.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,11 @@ sol = solve(prob, Rodas4())
4747

4848
prob = ODAEProblem(sys, u0, (0, 10.0))
4949
sol = solve(prob, Tsit5())
50+
51+
@variables t x1(t) x2(t) x3(t) x4(t)
52+
D = Differential(t)
53+
@named sys1_inner = ODESystem([D(x1) ~ x1], t)
54+
@named sys1_partial = compose(ODESystem([D(x2) ~ x2], t; name=:foo), sys1_inner)
55+
@named sys1 = extend(ODESystem([D(x3) ~ x3], t; name=:foo), sys1_partial)
56+
@named sys2 = compose(ODESystem([D(x4) ~ x4], t; name=:foo), sys1)
57+
@test_nowarn sys2.sys1.sys1_inner.x1 # test the correct nesting

0 commit comments

Comments
 (0)