Skip to content

Commit 5fea3ec

Browse files
committed
Restore @ICON tests
1 parent 59ecc4c commit 5fea3ec

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

test/model_parsing.jl

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,20 @@ end
8484
@parameters begin
8585
R, [unit = u""]
8686
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+
"""
101101
@equations begin
102102
v ~ i * R
103103
end
@@ -171,8 +171,8 @@ resistor = getproperty(rc, :resistor; namespace = false)
171171
eval(RC.structure[:kwargs][:k_val][:value])
172172
@test getdefault(rc.capacitor.v) == 0.0
173173

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)
176176
@test get_gui_metadata(rc.ground).layout ==
177177
read(abspath(ENV["MTK_ICONS_DIR"], "ground.svg"), String)
178178
@test get_gui_metadata(rc.capacitor).layout ==
@@ -404,10 +404,10 @@ end
404404
@test isequal(getdefault(a.b.j), 1 / params[1])
405405
@test getdefault(a.b.k) == 1
406406

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
411411
end
412412

413413
@testset "Metadata in variables" begin

0 commit comments

Comments
 (0)