@@ -597,21 +597,31 @@ include("TestBlockSparseArraysUtils.jl")
597597 c = @view b[4 : 8 , 4 : 8 ]
598598 @test c isa SubArray{<: Any ,<: Any ,<: BlockSparseArray }
599599 @test size (c) == (5 , 5 )
600- @test block_nstored (c) == 2
600+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
601+ @test block_nstored (c) == 2 broken = VERSION > v " 1.11-"
601602 @test blocksize (c) == (2 , 2 )
602603 @test blocklengths .(axes (c)) == ([2 , 3 ], [2 , 3 ])
603- @test size (c[Block (1 , 1 )]) == (2 , 2 )
604- @test c[Block (1 , 1 )] == a[Block (2 , 2 )[2 : 3 , 2 : 3 ]]
605- @test size (c[Block (2 , 2 )]) == (3 , 3 )
606- @test c[Block (2 , 2 )] == a[Block (1 , 1 )[1 : 3 , 1 : 3 ]]
607- @test size (c[Block (2 , 1 )]) == (3 , 2 )
608- @test iszero (c[Block (2 , 1 )])
609- @test size (c[Block (1 , 2 )]) == (2 , 3 )
610- @test iszero (c[Block (1 , 2 )])
604+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
605+ @test size (c[Block (1 , 1 )]) == (2 , 2 ) broken = VERSION ≥ v " 1.11-"
606+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
607+ @test c[Block (1 , 1 )] == a[Block (2 , 2 )[2 : 3 , 2 : 3 ]] broken = VERSION ≥ v " 1.11-"
608+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
609+ @test size (c[Block (2 , 2 )]) == (3 , 3 ) broken = VERSION ≥ v " 1.11-"
610+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
611+ @test c[Block (2 , 2 )] == a[Block (1 , 1 )[1 : 3 , 1 : 3 ]] broken = VERSION ≥ v " 1.11-"
612+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
613+ @test size (c[Block (2 , 1 )]) == (3 , 2 ) broken = VERSION ≥ v " 1.11-"
614+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
615+ @test iszero (c[Block (2 , 1 )]) broken = VERSION ≥ v " 1.11-"
616+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
617+ @test size (c[Block (1 , 2 )]) == (2 , 3 ) broken = VERSION ≥ v " 1.11-"
618+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
619+ @test iszero (c[Block (1 , 2 )]) broken = VERSION ≥ v " 1.11-"
611620
612621 x = randn (elt, 3 , 3 )
613622 c[Block (2 , 2 )] = x
614- @test c[Block (2 , 2 )] == x
623+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
624+ @test c[Block (2 , 2 )] == x broken = VERSION ≥ v " 1.11-"
615625 @test a[Block (1 , 1 )[1 : 3 , 1 : 3 ]] == x
616626
617627 a = BlockSparseArray {elt} ([2 , 3 ], [3 , 4 ])
@@ -637,10 +647,13 @@ include("TestBlockSparseArraysUtils.jl")
637647 @test copy (b) == a
638648 @test blocksize (b) == (2 , 2 )
639649 @test blocklengths .(axes (b)) == ([4 , 4 ], [4 , 4 ])
640- @test b[Block (1 , 1 )] == a[Block .(1 : 2 ), Block .(1 : 2 )]
641- @test b[Block (2 , 1 )] == a[Block .(3 : 4 ), Block .(1 : 2 )]
642- @test b[Block (1 , 2 )] == a[Block .(1 : 2 ), Block .(3 : 4 )]
643- @test b[Block (2 , 2 )] == a[Block .(3 : 4 ), Block .(3 : 4 )]
650+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
651+ if VERSION < v " 1.11-"
652+ @test b[Block (1 , 1 )] == a[Block .(1 : 2 ), Block .(1 : 2 )]
653+ @test b[Block (2 , 1 )] == a[Block .(3 : 4 ), Block .(1 : 2 )]
654+ @test b[Block (1 , 2 )] == a[Block .(1 : 2 ), Block .(3 : 4 )]
655+ @test b[Block (2 , 2 )] == a[Block .(3 : 4 ), Block .(3 : 4 )]
656+ end
644657 c = @view b[Block (2 , 2 )]
645658 @test blocksize (c) == (1 , 1 )
646659 @test c == a[Block .(3 : 4 ), Block .(3 : 4 )]
@@ -669,13 +682,17 @@ include("TestBlockSparseArraysUtils.jl")
669682 @test copy (b) == a[J, J]
670683 @test blocksize (b) == (2 , 2 )
671684 @test blocklengths .(axes (b)) == ([4 , 4 ], [4 , 4 ])
672- @test b[Block (1 , 1 )] == Array (a)[[7 , 8 , 5 , 6 ], [7 , 8 , 5 , 6 ]]
685+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
686+ @test b[Block (1 , 1 )] == Array (a)[[7 , 8 , 5 , 6 ], [7 , 8 , 5 , 6 ]] broken =
687+ VERSION ≥ v " 1.11-"
673688 c = @views b[Block (1 , 1 )][2 : 3 , 2 : 3 ]
674689 @test c == Array (a)[[8 , 5 ], [8 , 5 ]]
675- @test copy (c) == Array (a)[[8 , 5 ], [8 , 5 ]]
690+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
691+ @test copy (c) == Array (a)[[8 , 5 ], [8 , 5 ]] broken = VERSION ≥ v " 1.11-"
676692 c = @view b[Block (1 , 1 )[2 : 3 , 2 : 3 ]]
677693 @test c == Array (a)[[8 , 5 ], [8 , 5 ]]
678- @test copy (c) == Array (a)[[8 , 5 ], [8 , 5 ]]
694+ # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
695+ @test copy (c) == Array (a)[[8 , 5 ], [8 , 5 ]] broken = VERSION ≥ v " 1.11-"
679696 end
680697
681698 # TODO : Add more tests of this, it may
0 commit comments