Skip to content

Commit f2890ca

Browse files
committed
test show
1 parent d06b931 commit f2890ca

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/runtests.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ using Aqua,
55
StaticArrays,
66
Test,
77
Unitful
8-
p = Param(2.0, units = "k", bounds = (1, 2))
9-
@set p.val = 1
108

119
import BenchmarkTools
1210

@@ -85,6 +83,17 @@ end
8583
@test m[:newfield] == ntuple(x -> x, 8)
8684
end
8785

86+
@testset "show" begin
87+
m = Model(s1)
88+
sh = sprint(show, MIME"text/plain"(), m)
89+
@test occursin("Model with parent", sh)
90+
@test occursin("S1", sh)
91+
@test occursin("Param", sh)
92+
@test occursin("┌──────", sh)
93+
@test occursin("component", sh)
94+
@test occursin("100.0", sh)
95+
end
96+
8897
@testset "strip params from model" begin
8998
m = Model(s1);
9099
stripped = stripparams(m)

0 commit comments

Comments
 (0)