Skip to content

Commit 8006cd7

Browse files
author
Tuomas Sivula
committed
Rename folder xunit to tests and update readmes
1 parent 2453a33 commit 8006cd7

File tree

211 files changed

+40
-51
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+40
-51
lines changed

README.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Table of contents:
7575
3. CONTENTS
7676

7777
The GPstuff packge contains the following subdirectories:
78-
diag dist gp mc misc optim xunit SuiteSparse
78+
diag dist gp mc misc optim tests SuiteSparse
7979

8080
Each folder contains Contents.m, which summarizes the functions
8181
in the folder.
@@ -85,11 +85,12 @@ Table of contents:
8585

8686
4. TESTING THE INSTALLATION
8787

88-
Installation can be tested by running command test_all, which
89-
runs all demos and compares the computed results to pre-saved
90-
results. Running test_all takes about one hour and it requires
91-
that 'xunit' toolbox is in the Matlab path. xunit package can be
92-
downloaded from
88+
Installation can be tested by running command runtestset('fast'), which
89+
runs a collection of demos and compares the computed results to pre-saved
90+
results. Running this takes about one hour and it requires Matlab version
91+
2013b or greater for the unit test framework. For older versions, the
92+
'xunit' package can be used instead. The xunit package can be downloaded
93+
from
9394
http://www.mathworks.com/matlabcentral/fileexchange/22846-matlab-xunit-test-framework
9495

9596
5. USER QUIDE (VERY SHORT)

matlab_install.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function matlab_install(SuiteSparse_path)
7474
S{4} = [PP '/mc'];
7575
S{5} = [PP '/misc'];
7676
S{6} = [PP '/optim'];
77-
S{7} = [PP '/xunit'];
77+
S{7} = [PP '/tests'];
7878

7979
fprintf ('\n The following paths have been added. You may wish to add them\n') ;
8080
fprintf ('permanently, using the MATLAB pathtool command or copying the below\n') ;

startup.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
F = mfilename;
44
S = which(F);
55
if exist('OCTAVE_VERSION', 'builtin')
6-
subfolders={'diag' 'dist' 'gp' 'mc' 'misc' 'optim' 'xunit', 'octave_compat', 'inputparser'};
6+
subfolders={'diag' 'dist' 'gp' 'mc' 'misc' 'optim' 'tests', 'octave_compat', 'inputparser'};
77
else
8-
subfolders={'diag' 'dist' 'gp' 'mc' 'misc' 'optim' 'xunit'};
8+
subfolders={'diag' 'dist' 'gp' 'mc' 'misc' 'optim' 'tests'};
99
end
1010
for sf=subfolders
1111
addpath(strrep(S,[F '.m'],sf{:}))
@@ -21,7 +21,7 @@
2121
%addpath([gpstuffroot 'mc'])
2222
%addpath([gpstuffroot 'misc'])
2323
%addpath([gpstuffroot 'optim'])
24-
%addpath([gpstuffroot 'xunit'])
24+
%addpath([gpstuffroot 'tests'])
2525

2626
% If using Octave version of GPstuff, also add the following
2727
%addpath([gpstuffroot 'inputparser'])

tests/Readme.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
This directory contains unit test for GPstuff. The tests can be run using
2+
the built-in unit test framewoork (Matlab 2013b or greater) or using the
3+
xUnit package by Steve Eddins.
4+
5+
Test structure in every test is basically the same: Run demo, save values
6+
from demo, compare those saved test values to previously saved "correct"
7+
values. Users can run these tests to determine if some calculations within
8+
demos don't give correct answers.
9+
10+
Tests are named test_<demo_name>.m (e.g. test_binomial.m is a corresponding
11+
test for demo_binomial1.m) and they can include multiple test cases each.
12+
Individual tests can be run with command "runtests <test_file_name>".
13+
Function runtestset can be used to run all the tests or a predetermined set
14+
of tests.
15+
16+
When a test is run, the results of the demo are saved into the folder
17+
testValues. The saved components include figures, selected workspace
18+
variables and the log file of the command line output. Folder realValues
19+
contain similar precomputed files for each demo.
20+
21+
For more information to the MATLAB unit testing framework, see Matlab
22+
documentation.
23+
24+
For more information to the xUnit Test Framework package, visit
25+
http://www.mathworks.com/matlabcentral/fx_files/22846/11/content/matlab_xunit/doc/xunit_product_page.html
26+
27+
Real values from revision 990.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

xunit/rundemo.m renamed to tests/rundemo.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ function rundemo(name, varToSave, mode)
217217
throw(ME)
218218
end
219219

220-
fprintf('Results saved into the folder ''xunit/%sValues/''\n\n', ...
220+
fprintf('Results saved into the folder ''tests/%sValues/''\n\n', ...
221221
run_demo_data.mode)
222222

223223
end

xunit/runtestset.m renamed to tests/runtestset.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%RUNTESTSET Run a set of tests in GPstuff.
33
%
44
% Description
5-
% LOG = RUN_GP_TESTS(MODE) runs a set of tests in xunit folder and
5+
% LOG = RUN_GP_TESTS(MODE) runs a set of tests in tests folder and
66
% returns the test log. Each of the tests runs corresponding demo
77
% and compares the values to previously saved ones for errors. This is
88
% useful e.g. in case user modifies functions provided by GPstuff.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

xunit/Readme.txt

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)