Skip to content

Commit f8c8a9e

Browse files
committed
Test independent variable as system property
1 parent 7a00bdf commit f8c8a9e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/odesystem.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,3 +1264,10 @@ end
12641264
fn2, = ModelingToolkit.generate_function(sys2; expression = Val{false})
12651265
@test_nowarn fn2(ones(4), 2ones(6), 4.0)
12661266
end
1267+
1268+
@testset "Independent variable as system property" begin
1269+
@variables x(t)
1270+
@named sys = ODESystem([x ~ t], t)
1271+
@named sys = compose(sys, sys) # nest into a hierarchical system
1272+
@test t === sys.t === sys.sys.t
1273+
end

0 commit comments

Comments
 (0)