Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ before_script:

jobs:
include:
# - stage: "Tests"
# name: "Unit and integration Tests"
# script: octave $OCTFLAGS --eval "results = runTests; assert(all(~[results.Failed]))"
- stage: "BIDS validator"
name: "Create and check dataset"
script: octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/rawdata/ --ignoreNiftiHeaders
Expand Down
36 changes: 3 additions & 33 deletions tests/test_checkCFG.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function test_checkCfgDefault()
expectedStructure.testingDevice = 'pc';

%% test
checkSubFields(expectedStructure, cfg);
assertEqual(expectedStructure, cfg);

end

Expand Down Expand Up @@ -73,7 +73,7 @@ function test_checkCfgBasic()
expectedStructure = orderfields(expectedStructure);

%% test
checkSubFields(expectedStructure, cfg);
assertEqual(expectedStructure, cfg);

end

Expand Down Expand Up @@ -124,34 +124,4 @@ function test_checkCfgBasic()

expectedCfgStructure = orderfields(expectedCfgStructure);

end

function checkSubFields(expectedStructure, cfg)
% check that that the structures match
% if it fails it check from which subfield the error comes from

try

assertEqual(expectedStructure, cfg);

catch ME

if isstruct(expectedStructure)

names = fieldnames(expectedStructure);

for i = 1:numel(names)

disp(names{i});
testSubFields(expectedStructure.(names{i}), cfg.(names{i}));

end

end

disp(expectedStructure);
disp(cfg);

rethrow(ME);
end
end
end