diff --git a/.travis.yml b/.travis.yml index 16d3b453..1aee0e77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tests/test_checkCFG.m b/tests/test_checkCFG.m index f82a1171..6ac50b99 100644 --- a/tests/test_checkCFG.m +++ b/tests/test_checkCFG.m @@ -18,7 +18,7 @@ function test_checkCfgDefault() expectedStructure.testingDevice = 'pc'; %% test - checkSubFields(expectedStructure, cfg); + assertEqual(expectedStructure, cfg); end @@ -73,7 +73,7 @@ function test_checkCfgBasic() expectedStructure = orderfields(expectedStructure); %% test - checkSubFields(expectedStructure, cfg); + assertEqual(expectedStructure, cfg); end @@ -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 \ No newline at end of file