Skip to content

Commit 49cf9db

Browse files
committed
Added assertion to check that at least one vector is not dense
1 parent b027555 commit 49cf9db

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/unit/illegal_spmv.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ bool exec_tests(
2828
) {
2929
grb::semirings::boolean ring;
3030

31+
// at least one of the vectors is sparse
32+
assert(
33+
grb::nnz( out ) < grb::size( out ) ||
34+
grb::nnz( out2 ) < grb::size( out2 ) ||
35+
grb::nnz( in ) < grb::size( in ) ||
36+
grb::nnz( in2 ) < grb::size( in2 )
37+
);
38+
3139
// test 1, exec
3240
grb::RC rc = grb::mxv< grb::descriptors::dense >( out, A, in2, ring );
3341
if( rc != grb::ILLEGAL ) {

0 commit comments

Comments
 (0)