function dataMerged = slvnvmergedata(varargin)
%SLVNVMERGEDATA - Merge test case data
%
%   DATAMERGED = SLVNVMERGEDATA(DATA1, DATA2, ...) combines test cases and
%   counterexamples from each input argument DATA1, DATA2, and so on, into
%   a single test case data structure DATAMERGED. Input arguments should be
%   generated from either slvnvlogsignals, or a previous Simulink Design 
%   Verifier analysis. DATAMERGED can be an input argument to 
%   slvnvmakeharness, slvnvruntest, slvnvruncgvtest, or sldvrun. The
%   command will throw an error if input arguments are inconsistent. 
%   
%   See also SLVNVLOGSIGNALS, SLVNVMAKEHARNESS, SLVNVRUNTEST,
%   SLVNVRUNCGVTEST, SLDVRUN.

%   Copyright 2010-2013 The MathWorks, Inc.

    if nargin<2 
        msg   = ['Invalid usage of slvnvmergedata. ', ...
             'At least two inputs are expected.'];
        error('Slvnv:DATAMERGE:InvalidNumInputs',msg);
    end
    
    try 
        mergerObj = Sldv.DataMerger(mfilename);
        dataMerged = mergerObj.mergeData(varargin{1:end});
    catch Mex
        throw(Mex);
    end 
end
