@@ -1090,22 +1090,40 @@ arrayts = (Array, JLArray)
10901090 arrayt_elt = arrayt{elt,3 }
10911091
10921092 a = BlockSparseVector {elt,arrayt{elt,1}} ([2 , 2 ])
1093- @test sprint (summary, a) ==
1093+ # Either option is possible depending on namespacing.
1094+ @test (
1095+ sprint (summary, a) ==
10941096 " 2-blocked 4-element BlockSparseVector{$(elt) , $(vectort_elt) , …}"
1097+ ) || (
1098+ sprint (summary, a) ==
1099+ " 2-blocked 4-element BlockSparseArrays.BlockSparseVector{$(elt) , $(vectort_elt) , …}"
1100+ )
10951101
10961102 a = BlockSparseMatrix {elt,arrayt{elt,2}} ([2 , 2 ], [2 , 2 ])
1097- @test sprint (summary, a) ==
1098- " 2×2-blocked 4×4 BlockSparseMatrix{$(elt) , $(matrixt_elt) , …}"
1103+ # Either option is possible depending on namespacing.
1104+ @test (
1105+ sprint (summary, a) == " 2×2-blocked 4×4 BlockSparseMatrix{$(elt) , $(matrixt_elt) , …}"
1106+ ) || (
1107+ sprint (summary, a) ==
1108+ " 2×2-blocked 4×4 BlockSparseArrays.BlockSparseMatrix{$(elt) , $(matrixt_elt) , …}"
1109+ )
10991110
11001111 a = BlockSparseArray {elt,3,arrayt{elt,3}} ([2 , 2 ], [2 , 2 ], [2 , 2 ])
1101- @test sprint (summary, a) ==
1112+
1113+ # Either option is possible depending on namespacing.
1114+ @test (
1115+ sprint (summary, a) ==
11021116 " 2×2×2-blocked 4×4×4 BlockSparseArray{$(elt) , 3, $(arrayt_elt) , …}"
1117+ ) || (
1118+ sprint (summary, a) ==
1119+ " 2×2×2-blocked 4×4×4 BlockSparseArrays.BlockSparseArray{$(elt) , 3, $(arrayt_elt) , …}"
1120+ )
11031121
11041122 if elt === Float64
11051123 # Not testing other element types since they change the
11061124 # spacing so it isn't easy to make the test general.
11071125 a = BlockSparseMatrix {elt,arrayt{elt,2}} ([2 , 2 ], [2 , 2 ])
1108- a[1 , 2 ] = 12
1126+ @allowscalar a[1 , 2 ] = 12
11091127 @test sprint (show, " text/plain" , a) ==
11101128 " $(summary (a)) :\n $(zero (eltype (a))) $(eltype (a)(12 )) │ . .\n $(zero (eltype (a))) $(zero (eltype (a))) │ . .\n ───────────┼──────\n . . │ . .\n . . │ . ."
11111129 end
0 commit comments