11using ModelingToolkit, Test
22using ModelingToolkit: get_gui_metadata,
3- VariableDescription, getdefault, RegularConnector, get_ps
3+ VariableDescription, getdefault, RegularConnector, get_ps, getname
44using URIs: URI
55using Distributions
66using Unitful
@@ -146,7 +146,11 @@ l15 0" stroke="black" stroke-width="1" stroke-linejoin="bevel" fill="none"></pat
146146 C_val = 20
147147 R_val = 20
148148 res__R = 100
149- @named rc = RC (; C_val, R_val, resistor. R = res__R)
149+ @mtkbuild rc = RC (; C_val, R_val, resistor. R = res__R)
150+ resistor = getproperty (rc, :resistor ; namespace = false )
151+ @test getname (rc. resistor) === getname (resistor)
152+ @test getname (rc. resistor. R) === getname (resistor. R)
153+ @test getname (rc. resistor. v) === getname (resistor. v)
150154 # Test that `resistor.R` overrides `R_val` in the argument.
151155 @test getdefault (rc. resistor. R) == res__R != R_val
152156 # Test that `C_val` passed via argument is set as default of C.
@@ -166,7 +170,7 @@ l15 0" stroke="black" stroke-width="1" stroke-linejoin="bevel" fill="none"></pat
166170 @test ModelingToolkit. get_gui_metadata (rc. resistor. p). layout == Pin. structure[:icon ] ==
167171 URI (" file:///" * abspath (ENV [" MTK_ICONS_DIR" ], " pin.png" ))
168172
169- @test length (equations (structural_simplify (rc) )) == 1
173+ @test length (equations (rc )) == 1
170174end
171175
172176@testset " Parameters and Structural parameters in various modes" begin
0 commit comments