|
84 | 84 | @parameters begin |
85 | 85 | R, [unit = u"Ω"] |
86 | 86 | end |
87 | | -# @icon """<?xml version="1.0" encoding="UTF-8"?> |
88 | | -# <svg xmlns="http://www.w3.org/2000/svg" width="80" height="30"> |
89 | | -# <path d="M10 15 |
90 | | -# l15 0 |
91 | | -# l2.5 -5 |
92 | | -# l5 10 |
93 | | -# l5 -10 |
94 | | -# l5 10 |
95 | | -# l5 -10 |
96 | | -# l5 10 |
97 | | -# l2.5 -5 |
98 | | -# l15 0" stroke="black" stroke-width="1" stroke-linejoin="bevel" fill="none"></path> |
99 | | -# </svg> |
100 | | -# """ |
| 87 | + @icon """<?xml version="1.0" encoding="UTF-8"?> |
| 88 | +<svg xmlns="http://www.w3.org/2000/svg" width="80" height="30"> |
| 89 | +<path d="M10 15 |
| 90 | +l15 0 |
| 91 | +l2.5 -5 |
| 92 | +l5 10 |
| 93 | +l5 -10 |
| 94 | +l5 10 |
| 95 | +l5 -10 |
| 96 | +l5 10 |
| 97 | +l2.5 -5 |
| 98 | +l15 0" stroke="black" stroke-width="1" stroke-linejoin="bevel" fill="none"></path> |
| 99 | +</svg> |
| 100 | +""" |
101 | 101 | @equations begin |
102 | 102 | v ~ i * R |
103 | 103 | end |
@@ -171,8 +171,8 @@ resistor = getproperty(rc, :resistor; namespace = false) |
171 | 171 | eval(RC.structure[:kwargs][:k_val][:value]) |
172 | 172 | @test getdefault(rc.capacitor.v) == 0.0 |
173 | 173 |
|
174 | | -#@test get_gui_metadata(rc.resistor).layout == Resistor.structure[:icon] == |
175 | | -# read(joinpath(ENV["MTK_ICONS_DIR"], "resistor.svg"), String) |
| 174 | +@test get_gui_metadata(rc.resistor).layout == Resistor.structure[:icon] == |
| 175 | + read(joinpath(ENV["MTK_ICONS_DIR"], "resistor.svg"), String) |
176 | 176 | @test get_gui_metadata(rc.ground).layout == |
177 | 177 | read(abspath(ENV["MTK_ICONS_DIR"], "ground.svg"), String) |
178 | 178 | @test get_gui_metadata(rc.capacitor).layout == |
@@ -404,10 +404,10 @@ end |
404 | 404 | @test isequal(getdefault(a.b.j), 1 / params[1]) |
405 | 405 | @test getdefault(a.b.k) == 1 |
406 | 406 |
|
407 | | - # @named a = A(p = 10, b.i = 20, b.j = 30, b.k = 40) |
408 | | - # @test getdefault(a.b.i) == 20 |
409 | | - # @test getdefault(a.b.j) == 30 |
410 | | - # @test getdefault(a.b.k) == 40 |
| 407 | + @named a = A(p = 10, b.i = 20, b.j = 30, b.k = 40) |
| 408 | + @test getdefault(a.b.i) == 20 |
| 409 | + @test getdefault(a.b.j) == 30 |
| 410 | + @test getdefault(a.b.k) == 40 |
411 | 411 | end |
412 | 412 |
|
413 | 413 | @testset "Metadata in variables" begin |
|
0 commit comments