Skip to content

Commit 07f10bc

Browse files
committed
mh fix
1 parent 9991dca commit 07f10bc

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function test_suite = test_setTargetPositionInSequence %#ok<*STOUT>
2-
2+
33
initEnv();
4-
4+
55
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
66
test_functions = localfunctions(); %#ok<*NASGU>
77
catch % no problem; early Matlab versions can use initTestSuite fine
@@ -10,51 +10,51 @@
1010
end
1111

1212
function test_setTargetPositionInSequenceBasic()
13-
13+
1414
seqLength = 12;
1515
nbTarget = 3;
1616
forbiddenPos = [1 5 10];
17-
17+
1818
% Create a hundred draws of targer positiona and ensure that
1919
% - the forbidden position are never drawn
2020
% - the interval between target is superior to 1
2121
for i = 1:100
2222
chosenPositions(i, :) = setTargetPositionInSequence(seqLength, nbTarget, forbiddenPos);
2323
end
24-
24+
2525
assertFalse(any(ismember(chosenPositions(:), forbiddenPos)));
26-
26+
2727
interval = abs(diff(chosenPositions, [], 2));
2828
assertTrue(all(interval(:) > 1));
29-
29+
3030
end
3131

3232
function initEnv
33-
33+
3434
installlist = {'io', 'statistics'};
35-
35+
3636
if isOctave
37-
37+
3838
for ii = 1:length(installlist)
39-
39+
4040
packageName = installlist{ii};
41-
41+
4242
try
4343
% Try loading Octave packages
4444
disp(['loading ' packageName]);
4545
pkg('load', packageName);
46-
46+
4747
catch
4848
tryInstallFromForge(packageName);
4949
end
5050
end
51-
51+
5252
end
53-
53+
5454
end
5555

5656
function tryInstallFromForge(packageName)
57-
57+
5858
errorcount = 1;
5959
while errorcount % Attempt twice in case installation fails
6060
try
@@ -68,5 +68,5 @@ function tryInstallFromForge(packageName)
6868
end
6969
end
7070
end
71-
71+
7272
end

0 commit comments

Comments
 (0)