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
1 change: 0 additions & 1 deletion manualTests/miss_hit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
line_length: 100
regex_function_name: "((test_[a-z]+)|[a-z]+)(([A-Z]){1}[A-Za-z]+)*"
suppress_rule: "copyright_notice"

# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
metric "cnest": limit 4
Expand Down
2 changes: 2 additions & 0 deletions manualTests/test_makeRawDataset.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_makeRawDataset()

outputDir = fullfile(fileparts(mfilename('fullpath')), 'output');
Expand Down
9 changes: 9 additions & 0 deletions src/templates/miss_hit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
line_length: 100
regex_function_name: "((test_[a-z]+)|[a-z]+)(([A-Z]){1}[A-Za-z]+)*"

# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
metric "cnest": limit 4
metric "file_length": limit 500
metric "cyc": limit 15
metric "parameters": limit 5
9 changes: 7 additions & 2 deletions src/templates/templateFunction.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
% :param argin3: (dimension) optional argument
% :type argin3: integer
%
% :returns: - :argout1: (type) (dimension)
% - :argout2: (type) (dimension)
% :returns:
% :argout1: (type) (dimension)
% :argout2: (type) (dimension)
%
% :output:
% :file created: description
% :other file created: description
%
% .. todo:
%
Expand Down
29 changes: 29 additions & 0 deletions src/templates/templateTest.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_templateTest %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite;
end

function test_templateTestBasic()

%% set up

% cfg.input_1 = ...

%% use function to test

% actualOupout = foo(cfg);

%% assert that output content / type / size is what you expect

% expectedOuput = X;

% assertEqual(actualOupout, expectedOuput)

%% clean up (delete temporary files that were created)

end
1 change: 0 additions & 1 deletion tests/miss_hit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
line_length: 100
regex_function_name: "((test_[a-z]+)|[a-z]+)(([A-Z]){1}[A-Za-z]+)*"
suppress_rule: "copyright_notice"

# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
metric "cnest": limit 4
Expand Down
2 changes: 2 additions & 0 deletions tests/test_askForGroupAndOrSession.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_askForGroupAndOrSession %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_checkCFG.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_checkCFG %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_createDataDictionary.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_createDataDictionary %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_createDatasetDescription.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_createDatasetDescription %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_createFilename.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_createFilename %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_createJson.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_createJson %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_createQuestionList.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_createQuestionList %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_createValidName.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_createValidName %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_getIsQuestionToAsk.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_getIsQuestionToAsk %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_isPositiveInteger.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_isPositiveInteger %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_readAndFilterLogfile.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_readAndFilterLogfile %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_removeDateSuffix.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_removeDateSuffix %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_saveEventsFileInit.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_saveEventsFileInit %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_saveEventsFileOpen.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_saveEventsFileOpen %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_saveEventsFileOpenMultiColumn.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_saveEventsFileOpenMultiColumn %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_saveEventsFileSave.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_saveEventsFileSave %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_setDefaultFields.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_setDefaultFields %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_setDefaultResponses.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_setDefaultResponses %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_transferInfoToBids.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_transferInfoToBids %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_utils.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
% (C) Copyright 2020 CPP_BIDS developers

function test_suite = test_utils %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
Expand Down