Skip to content

Commit 6c2204b

Browse files
committed
add regression test
1 parent 4b8a894 commit 6c2204b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/test_tensoralgebraext.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ function randn_blockdiagonal(elt::Type, axes::Tuple)
1414
return a
1515
end
1616

17+
@testset "Regression test for BlockArrays" begin
18+
# test https://github.com/ITensor/BlockSparseArrays.jl/issues/57
19+
d = blockedrange([1, 1])
20+
a = BlockArray(ones((d, d, d, d)))
21+
@test contract(a, (1, -1, 2, -2), a, (2, -3, 1, -4)) isa Tuple
22+
end
23+
1724
const elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
1825
@testset "`contract` `BlockSparseArray` (eltype=$elt)" for elt in elts
1926
@testset "BlockedOneTo" begin

0 commit comments

Comments
 (0)