% Testcases for EEGLab
% Copyright (C) 2006 Andreas Romeyke & Ronny Lindner
% Max-Planck-Institute for Human Cognitive and Brain Sciences Leipzig, Germany
% romeyke@cbs.mpg.de, art1@it-netservice.de
%
% based on EEGLab-toolbox
% http://www.sccn.ucsd.edu/eeglab/
% Copyright (C) 1996 Scott Makeig et al, SCCN/INC/UCSD, scott@sccn.ucsd.edu
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

function passed = pass_zero()

        EEG = eeg_emptyset;

        EEG.nbchan = 2; % channels
        EEG.trials = 5; % epochs

        EEG.reject.rejmanual = [0 0 0 0 0];
        EEG.reject.rejfreq =   [0 0 0 0 0];
        EEG.reject.rejmanualE = [ [0 0 0 0 0]; ...
                                  [0 0 0 0 0] ];
        EEG.reject.rejfreqE =   [ [0 0 0 0 0]; ...
                                  [0 0 0 0 0] ];
        %%%%%%%%%
        cEEG = eeg_emptyset;
        cEEG.reject.rejmanual = [0 0 0 0 0];
        cEEG.reject.rejfreq =   [0 0 0 0 0];
        cEEG.reject.rejmanualE = [ [0 0 0 0 0]; ...
                                   [0 0 0 0 0] ];
        cEEG.reject.rejfreqE =   [ [0 0 0 0 0]; ...
                                   [0 0 0 0 0] ];

        cEEG.reject.rejglobal = [0 0 0 0 0];
        cEEG.reject.rejglobalE = [ [0 0 0 0 0]; ...
                                   [0 0 0 0 0] ];
        %%%%%%%%%
        rEEG= eeg_rejsuperpose(EEG, 1, 1, 0, 0, 0, 0, 1, 0);

        if ~near(cEEG.reject.rejmanual,  rEEG.reject.rejmanual) ...
        || ~near(cEEG.reject.rejmanualE, rEEG.reject.rejmanualE) ...
        || ~near(cEEG.reject.rejfreq,    rEEG.reject.rejfreq) ...
        || ~near(cEEG.reject.rejfreqE,   rEEG.reject.rejfreqE) ...
        || ~near(cEEG.reject.rejglobal,  rEEG.reject.rejglobal) ...
        || ~near(cEEG.reject.rejglobalE, rEEG.reject.rejglobalE)
            error('EEGLAB:unittesting', 'Error in eeg_rejsuperpose(): incorrect output.');
        end;
