Refactor the tests to use initializer lists

Replace `std::vector<RCP<const Basic>> &` by `const std::vector<RCP<const Basic>> &`
in constructor `DenseMatrix`. This fixed the error with initializer lists.