Skip to content

Commit 516b3e7

Browse files
authored
Merge pull request #66 from cpp-lln-lab/remi-localizer_update
localizer update: only improve unit tests
2 parents 3f0cfbc + 644689a commit 516b3e7

File tree

2 files changed

+3
-36
lines changed

2 files changed

+3
-36
lines changed

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ before_script:
3636

3737
jobs:
3838
include:
39-
# - stage: "Tests"
40-
# name: "Unit and integration Tests"
41-
# script: octave $OCTFLAGS --eval "results = runTests; assert(all(~[results.Failed]))"
4239
- stage: "BIDS validator"
4340
name: "Create and check dataset"
4441
script: octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/rawdata/ --ignoreNiftiHeaders

tests/test_checkCFG.m

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function test_checkCfgDefault()
1818
expectedStructure.testingDevice = 'pc';
1919

2020
%% test
21-
checkSubFields(expectedStructure, cfg);
21+
assertEqual(expectedStructure, cfg);
2222

2323
end
2424

@@ -73,7 +73,7 @@ function test_checkCfgBasic()
7373
expectedStructure = orderfields(expectedStructure);
7474

7575
%% test
76-
checkSubFields(expectedStructure, cfg);
76+
assertEqual(expectedStructure, cfg);
7777

7878
end
7979

@@ -124,34 +124,4 @@ function test_checkCfgBasic()
124124

125125
expectedCfgStructure = orderfields(expectedCfgStructure);
126126

127-
end
128-
129-
function checkSubFields(expectedStructure, cfg)
130-
% check that that the structures match
131-
% if it fails it check from which subfield the error comes from
132-
133-
try
134-
135-
assertEqual(expectedStructure, cfg);
136-
137-
catch ME
138-
139-
if isstruct(expectedStructure)
140-
141-
names = fieldnames(expectedStructure);
142-
143-
for i = 1:numel(names)
144-
145-
disp(names{i});
146-
testSubFields(expectedStructure.(names{i}), cfg.(names{i}));
147-
148-
end
149-
150-
end
151-
152-
disp(expectedStructure);
153-
disp(cfg);
154-
155-
rethrow(ME);
156-
end
157-
end
127+
end

0 commit comments

Comments
 (0)