From 4efd5880c4fc25ba674c1a77bb5b2acb24fc2de2 Mon Sep 17 00:00:00 2001 From: Benedikt Ehinger Date: Fri, 16 Dec 2022 12:47:36 +0100 Subject: [PATCH] new unitttest issue #114 --- unittests/test_designmat.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/unittests/test_designmat.m b/unittests/test_designmat.m index db7dc11..ec9d3d8 100644 --- a/unittests/test_designmat.m +++ b/unittests/test_designmat.m @@ -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