Skip to content

Commit c220859

Browse files
author
Tuomas Sivula
committed
Increase tolerance in test_regression_robust
1 parent a2afbb4 commit c220859

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

xunit/runtestset.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
%
44
% Description
55
% LOG = RUN_GP_TESTS(MODE) runs a set of tests in xunit folder and
6-
% returns the test log. Parameter MODE can be either 'fast' (default) or
7-
% 'all'. Fast mode runs a selection of test taking about one hour and
8-
% all mode runs all the tests. Each of the tests runs corresponding demo
6+
% returns the test log. Each of the tests runs corresponding demo
97
% and compares the values to previously saved ones for errors. This is
108
% useful e.g. in case user modifies functions provided by GPstuff.
119
%
10+
% Possible values for parameter MODE:
11+
% 'fast' - runs a selection of test taking about one hour (default)
12+
% 'all' - runs all the tests
13+
%
1214
% Can be used with both xUnit Test Framework package by Steve Eddins
1315
% and the built-in Unit Testing Framework.
1416
%

xunit/test_regression_robust.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ function testPredictionEP(testCase)
5050
end
5151

5252
function testMCMCSamples(testCase)
53-
verifyVarsEqual(testCase, getName(), {'w'}, @mean, ...
53+
verifyVarsEqual(testCase, getName(), {'w'}, @(x) mean(x(:,1)), ...
54+
'AbsTol', 1)
55+
verifyVarsEqual(testCase, getName(), {'w'}, @(x) mean(x(:,[2,3])), ...
5456
'AbsTol', 0.5)
5557
end
5658

0 commit comments

Comments
 (0)