Skip to content

Commit

Permalink
new unitttest issue #114
Browse files Browse the repository at this point in the history
  • Loading branch information
behinger committed Dec 16, 2022
1 parent b262ba1 commit 4efd588
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions unittests/test_designmat.m
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,21 @@ function test_designmat()
assert(length(EEGtest.unfold.variablenames)==8)
assert(length(EEGtest.unfold.colnames)==24)

%% Issue #114, no error when an empty EEG.event.type is put in
EEGtest = EEGsim;
cfgDesign = [];

cfgDesign.codingschema = 'reference';
cfgDesign.formula = {'y~1', 'y~1+cat(conditionA)*continuousA', 'y~1+spl(splineA,5)+spl(splineB,5)+continuousA'};
cfgDesign.eventtypes = {'stimulus1', 'stimulus2', 'stimulus3'};


try
EEGtest.event(5).type = [];
uf_designmat(EEGtest,cfgDesign)
catch
% success
end

end

Expand Down

0 comments on commit 4efd588

Please sign in to comment.