Add test cases for basic matrix manipulations (in-memory dense matrix and
in-row-format dense matrix)