Skip to content

Commit 4efd588

Browse files
committed
new unitttest issue #114
1 parent b262ba1 commit 4efd588

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

unittests/test_designmat.m

+15
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,21 @@ function test_designmat()
220220
assert(length(EEGtest.unfold.variablenames)==8)
221221
assert(length(EEGtest.unfold.colnames)==24)
222222

223+
%% Issue #114, no error when an empty EEG.event.type is put in
224+
EEGtest = EEGsim;
225+
cfgDesign = [];
226+
227+
cfgDesign.codingschema = 'reference';
228+
cfgDesign.formula = {'y~1', 'y~1+cat(conditionA)*continuousA', 'y~1+spl(splineA,5)+spl(splineB,5)+continuousA'};
229+
cfgDesign.eventtypes = {'stimulus1', 'stimulus2', 'stimulus3'};
230+
231+
232+
try
233+
EEGtest.event(5).type = [];
234+
uf_designmat(EEGtest,cfgDesign)
235+
catch
236+
% success
237+
end
223238

224239
end
225240

0 commit comments

Comments
 (0)