Skip to content

Commit

Permalink
Test @mtkmodel independent variable generation
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Aug 30, 2024
1 parent fb1189a commit dc954e8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/odesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,18 @@ end
@variables y(x)
@test_nowarn @named sys = ODESystem([y ~ 0], x)

# the same, but with @mtkmodel
@independent_variables x
@mtkmodel MyModel begin
@variables begin
y(x)
end
@equations begin
y ~ 0
end
end
@test_nowarn @mtkbuild sys = MyModel()

@variables x y(x)
@test_logs (:warn,) @named sys = ODESystem([y ~ 0], x)

Expand Down

0 comments on commit dc954e8

Please sign in to comment.