Skip to content

Commit

Permalink
ENH - updated test function
Browse files Browse the repository at this point in the history
  • Loading branch information
schoffelen committed Apr 11, 2024
1 parent 37e93c5 commit 1a39916
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/test_ft_selectdata.m
Expand Up @@ -323,3 +323,18 @@
ok = false;
end
assert(~ok, 'ft_selectdata with raw input and union selection should fail');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% this part of the script tests a specific latency selection on raw data, causing
% some of the trials being empty

cfg = [];
cfg.latency = [5 10];
datasel3 = ft_selectdata(cfg, data);
assert(numel(datasel3.trial)== 1);

% add a sampleinfo
data.sampleinfo = [1 10;11 20];
datasel4 = ft_selectdata(cfg, data);
assert(size(datasel4.sampleinfo,1)==1);

0 comments on commit 1a39916

Please sign in to comment.