Skip to content

Commit a0aad45

Browse files
committed
Add tests
1 parent c7d6667 commit a0aad45

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/model_parsing.jl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ end
329329
# Ensure that modules consisting MTKModels with component arrays and icons of
330330
# `Expr` type and `unit` metadata can be precompiled.
331331
module PrecompilationTest
332-
using Unitful, Test, ModelingToolkit
332+
using Unitful, Test, ModelParsingPrecompile
333333
@testset "Precompile packages with MTKModels" begin
334334
push!(LOAD_PATH, joinpath(@__DIR__, "precompile_test"))
335335

@@ -539,3 +539,16 @@ end
539539
@test Equation[ternary_true.ternary_parameter_true ~ 0] == equations(ternary_true)
540540
@test Equation[ternary_false.ternary_parameter_false ~ 0] == equations(ternary_false)
541541
end
542+
543+
_b = Ref{Any}()
544+
@mtkmodel MyModel begin
545+
@variables begin
546+
x___(t) = 0
547+
end
548+
begin
549+
_b[] = x___
550+
end
551+
end
552+
@named m = MyModel()
553+
@variables t x___(t)
554+
@test isequal(x___, _b[])

0 commit comments

Comments
 (0)