unit tests for matvec.c