@@ -22,7 +22,7 @@ using GradedArrays:
2222using SparseArraysBase: storedlength
2323using LinearAlgebra: adjoint
2424using Random: randn!
25- using Test: @test , @testset
25+ using Test: @test , @testset , @test_throws
2626
2727function randn_blockdiagonal (elt:: Type , axes:: Tuple )
2828 a = BlockSparseArray {elt} (undef, axes)
@@ -387,12 +387,10 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
387387 a2[Block (2 , 1 )] = randn (elt, size (@view (a2[Block (2 , 1 )])))
388388 @test Array (a1 * a2) ≈ Array (a1) * Array (a2)
389389 @test Array (a1' * a2' ) ≈ Array (a1' ) * Array (a2' )
390-
391- a2 = BlockSparseArray {elt} (undef, r, dual (r))
392- a2[Block (1 , 2 )] = randn (elt, size (@view (a2[Block (1 , 2 )])))
393- a2[Block (2 , 1 )] = randn (elt, size (@view (a2[Block (2 , 1 )])))
394390 @test Array (a1' * a2) ≈ Array (a1' ) * Array (a2)
395391 @test Array (a1 * a2' ) ≈ Array (a1) * Array (a2' )
392+
393+ @test_throws DimensionMismatch a1 * permutedims (a2, (2 , 1 ))
396394 end
397395 @testset " Construct from dense" begin
398396 r = gradedrange ([U1 (0 ) => 2 , U1 (1 ) => 3 ])
0 commit comments