Skip to content

Commit d9536cc

Browse files
committed
add tests for show
1 parent 0d1ae53 commit d9536cc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/symmetries/spaces.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,4 +452,12 @@ end
452452
end
453453
end
454454

455+
@timedtestset "show and friends" begin
456+
V = U1Space(i => 1 for i in 1:3)
457+
@test string(V) == "Rep[U₁](1 => 1, 2 => 1, 3 => 1)"
458+
@test string(V') == "Rep[U₁](1 => 1, 2 => 1, 3 => 1)'"
459+
@test sprint((x, y) -> show(x, MIME"text/plain"(), y), V) == "Rep[U₁](…) of dim 3:\n 1 => 1\n 2 => 1\n 3 => 1"
460+
@test sprint((x, y) -> show(x, MIME"text/plain"(), y), V') == "Rep[U₁](…)' of dim 3:\n 1 => 1\n 2 => 1\n 3 => 1"
461+
end
462+
455463
TensorKit.empty_globalcaches!()

0 commit comments

Comments
 (0)