Skip to content

Commit dc954e8

Browse files
committed
Test @mtkmodel independent variable generation
1 parent fb1189a commit dc954e8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/odesystem.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,18 @@ end
12021202
@variables y(x)
12031203
@test_nowarn @named sys = ODESystem([y ~ 0], x)
12041204

1205+
# the same, but with @mtkmodel
1206+
@independent_variables x
1207+
@mtkmodel MyModel begin
1208+
@variables begin
1209+
y(x)
1210+
end
1211+
@equations begin
1212+
y ~ 0
1213+
end
1214+
end
1215+
@test_nowarn @mtkbuild sys = MyModel()
1216+
12051217
@variables x y(x)
12061218
@test_logs (:warn,) @named sys = ODESystem([y ~ 0], x)
12071219

0 commit comments

Comments
 (0)