#include #include "UnitTest++.h" #include "../mat_checks.h" using namespace itpp; TEST ( randun_test ) { // matlab output obtained by // >>clear all // >>randun(10); vec matlab_out = " 0.695964974209650, 0.083321541586575, 0.385149445564090, 0.206731595660901, 0.537928272754852, 0.960480190795139, 0.790566693893898, 0.054424274738144, 0.708785523990535, 0.558301708920999"; //ASSUMING randun was not used yet! vec x = randun ( 10 ); CHECK_CLOSE ( matlab_out, x, 1e-6 ); }