Add sparse matrix support to test suite.