Skip to content

Commit 8b0c8e4

Browse files
authored
Fix comparison between view and slice in tests (#368)
1 parent 687cd32 commit 8b0c8e4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/test_blockindices.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ import BlockArrays: BlockIndex, BlockIndexRange, BlockSlice
117117

118118
B = BlockArray([1:3;], [2,1])
119119
Cb = CartesianIndices(B)
120-
@test view(Cb, Block(1)) ==Cb[Block(1)] ==CartesianIndices((1:2,))
121-
@test view(Cb, Block(2)) ==Cb[Block(2)] ==CartesianIndices((3:3,))
120+
@test view(Cb, Block(1)) ==CartesianIndices((1:2,)) == Cb[Block(1)]
121+
@test view(Cb, Block(2)) ==CartesianIndices((3:3,)) == Cb[Block(2)]
122122

123123
B = BlockArray(reshape([1:9;],3,3), [2,1], [2,1])
124124
Cb = CartesianIndices(B)
125-
@test view(Cb, Block(1,1)) ==Cb[Block(1,1)] ==CartesianIndices((1:2,1:2))
126-
@test view(Cb, Block(1,2)) ==Cb[Block(1,2)] ==CartesianIndices((1:2, 3:3))
127-
@test view(Cb, Block(2,1)) ==Cb[Block(2,1)] ==CartesianIndices((3:3,1:2))
128-
@test view(Cb, Block(2,2)) ==Cb[Block(2,2)] ==CartesianIndices((3:3, 3:3))
125+
@test view(Cb, Block(1,1)) ==CartesianIndices((1:2,1:2)) == Cb[Block(1,1)]
126+
@test view(Cb, Block(1,2)) ==CartesianIndices((1:2, 3:3)) == Cb[Block(1,2)]
127+
@test view(Cb, Block(2,1)) ==CartesianIndices((3:3,1:2)) == Cb[Block(2,1)]
128+
@test view(Cb, Block(2,2)) ==CartesianIndices((3:3, 3:3)) == Cb[Block(2,2)]
129129
for i in 1:2, j in 1:2
130130
@test view(Cb, Block(j), Block(i)) ==view(Cb, Block(j, i))
131131
end

0 commit comments

Comments
 (0)