File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 329
329
# Ensure that modules consisting MTKModels with component arrays and icons of
330
330
# `Expr` type and `unit` metadata can be precompiled.
331
331
module PrecompilationTest
332
- using Unitful, Test, ModelingToolkit
332
+ using Unitful, Test, ModelParsingPrecompile
333
333
@testset " Precompile packages with MTKModels" begin
334
334
push! (LOAD_PATH , joinpath (@__DIR__ , " precompile_test" ))
335
335
539
539
@test Equation[ternary_true. ternary_parameter_true ~ 0 ] == equations (ternary_true)
540
540
@test Equation[ternary_false. ternary_parameter_false ~ 0 ] == equations (ternary_false)
541
541
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[])
You can’t perform that action at this time.
0 commit comments