Skip to content

Commit 1e3ff2f

Browse files
committed
make sure the stats package is loaded for testing
1 parent 653110a commit 1e3ff2f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/isOctave.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function retval = isOctave
2+
% Return: true if the environment is Octave.
3+
persistent cacheval % speeds up repeated calls
4+
5+
if isempty (cacheval)
6+
cacheval = (exist ('OCTAVE_VERSION', 'builtin') > 0);
7+
end
8+
9+
retval = cacheval;
10+
end

tests/test_setTargetPositionInSequence.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
function test_suite = test_setTargetPositionInSequence %#ok<*STOUT>
2+
3+
if isOctave()
4+
pkg('load','statistics');
5+
end
6+
27
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
38
test_functions = localfunctions(); %#ok<*NASGU>
49
catch % no problem; early Matlab versions can use initTestSuite fine

0 commit comments

Comments
 (0)