Mercurial > hg > ltpda
diff testing/utp_1.1/utps/miir/utp_miir_copy.m @ 44:409a22968d5e default
Add unit tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Tue, 06 Dec 2011 18:42:11 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testing/utp_1.1/utps/miir/utp_miir_copy.m Tue Dec 06 18:42:11 2011 +0100 @@ -0,0 +1,50 @@ +% UTP_MIIR_COPY a set of UTPs for the miir/copy method +% +% M Hewitson 06-08-08 +% +% $Id: utp_miir_copy.m,v 1.5 2009/08/08 12:21:40 hewitson Exp $ +% + +% <MethodDescription> +% +% The copy method of the miir class copies the input object depending of the +% second input. +% +% </MethodDescription> + +function results = utp_miir_copy(varargin) + + % Check the inputs + if nargin == 0 + + % Some keywords + class = 'miir'; + mthd = 'copy'; + + results = []; + disp('******************************************************'); + disp(['**** Running UTPs for ' class '/' mthd]); + disp('******************************************************'); + + % Exception list for the UTPs: + [ple1,ple2,ple3,ple4,ple5,ple6] = get_test_ples(); + + % Run the tests + results = [results utp_69(class, 1, 1, ple2)]; + results = [results utp_69(class, 1, 3, ple2)]; + results = [results utp_69(class, 2, 3, ple2)]; + + disp('Done.'); + disp('******************************************************'); + + elseif nargin == 1 % Check for UTP functions + if strcmp(varargin{1}, 'isutp') + results = 1; + else + results = 0; + end + else + error('### Incorrect inputs') + end + +end