Testsuite: set the random seed for unitary tests, for reproducibility

time-shift
Sébastien Villemot 2020-02-04 18:16:40 +01:00
parent 2ae1bc7770
commit a8e54d791a
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 8 additions and 0 deletions

View File

@ -38,6 +38,14 @@ if isoctave
mlist = mlist(find(~strcmp('../matlab/load_m_file_data_legacy.m', mlist)));
end
% Set random seed, for reproducibility
if isoctave || matlab_ver_less_than('7.12')
randn('state',1);
rand('state',1);
else
rng(1);
end
failedtests = {};
counter = 0;