refactored test/function/matrix and test/function/probability to mocha