@@ -55,22 +55,22 @@ arrayts = (Array, JLArray)
55
55
@test view! (a, blk... ) == x
56
56
@test @view! (a[blk... ]) == x
57
57
end
58
- # # # 0-dim case
59
- # # # Regression test for https://github.com/ITensor/BlockSparseArrays.jl/issues/148
60
- # # for I in ((), (Block(),))
61
- # # a = dev(BlockSparseArray{elt}(undef))
62
- # # @test !isstored(a)
63
- # # @test iszero(blockstoredlength(a))
64
- # # @test isempty(eachblockstoredindex(a))
65
- # # @test iszero(a)
66
- # # b = @view! a[I...]
67
- # # @test isstored(a)
68
- # # @test isone(blockstoredlength(a))
69
- # # @test issetequal(eachblockstoredindex(a), [Block()])
70
- # # @test iszero(adapt(Array)(a))
71
- # # @test b isa arrayt{elt,0}
72
- # # @test size(b) == ()
73
- # # # Converting to `Array` works around a bug in `iszero(JLArray{Float64}(undef))`.
74
- # # @test iszero(adapt(Array)(b))
75
- # # end
58
+ # 0-dim case
59
+ # Regression test for https://github.com/ITensor/BlockSparseArrays.jl/issues/148
60
+ for I in ((), (Block (),))
61
+ a = dev (BlockSparseArray {elt} (undef))
62
+ @test ! isstored (a)
63
+ @test iszero (blockstoredlength (a))
64
+ @test isempty (eachblockstoredindex (a))
65
+ @test iszero (a)
66
+ b = @view! a[I... ]
67
+ @test isstored (a)
68
+ @test isone (blockstoredlength (a))
69
+ @test issetequal (eachblockstoredindex (a), [Block ()])
70
+ @test iszero (adapt (Array)(a))
71
+ @test b isa arrayt{elt,0 }
72
+ @test size (b) == ()
73
+ # Converting to `Array` works around a bug in `iszero(JLArray{Float64}(undef))`.
74
+ @test iszero (adapt (Array)(b))
75
+ end
76
76
end
0 commit comments