Skip to content

Commit 93a0086

Browse files
authored
Add extra spaces while displaying a TensorSpace (#223)
* space in tensorspace show * add leading space * use pointspace in tests
1 parent ec4e732 commit 93a0086

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/show.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function show(io::IO,s::TensorSpace)
171171
d = length(s.spaces)
172172
for i=1:d-1
173173
show(io,s.spaces[i])
174-
print(io,"")
174+
print(io,"")
175175
end
176176
show(io,s.spaces[d])
177177
end

test/show.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
@test contains(repr(c), "ConstantSpace")
1515
@test contains(repr(c), repr(domain(c)))
1616
end
17+
@testset "TensorSpace" begin
18+
S1 = PointSpace(1:3)
19+
S = S1 S1
20+
v = strip.(split(repr(S), ''))
21+
@test length(v) == 2
22+
@test all(==(repr(S1)), v)
23+
end
1724
end
1825
@testset "Fun" begin
1926
f = Fun(PointSpace(1:3), [1,2,3])

0 commit comments

Comments
 (0)