Skip to content

Commit

Permalink
Test with duplicate names
Browse files Browse the repository at this point in the history
  • Loading branch information
contradict committed Aug 7, 2024
1 parent b26d580 commit efc835f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/model_parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -854,3 +854,25 @@ end
@test getdefault(vec_false.n[i]) == 1
end
end

@testset "Duplicate names" begin
mod = @__MODULE__
@test_throws ErrorException ModelingToolkit._model_macro(mod, :ATest,
:(begin
@variables begin
a(t)
a(t)
end
end),
false)
@test_throws ErrorException ModelingToolkit._model_macro(mod, :ATest,
:(begin
@variables begin
a(t)
end
@parameters begin
a
end
end),
false)
end

0 comments on commit efc835f

Please sign in to comment.