44
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % UTP_PLIST_PLIST2CMDS a set of UTPs for the plist/plist2cmds method
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 % M Hewitson 06-08-08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 % $Id: utp_plist_plist2cmds.m,v 1.4 2009/08/24 17:23:10 ingo Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 % <MethodDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 % The plist2cmds method of the plist class convert a plist to a set of
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 % commands.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 % </MethodDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 function results = utp_plist_plist2cmds(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 % Check the inputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 if nargin == 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 % Some keywords
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 class = 'plist';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 mthd = 'plist2cmds';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 results = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 disp('******************************************************');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 disp(['**** Running UTPs for ' class '/' mthd]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 disp('******************************************************');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 % Test PLIST objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 [pl1, pl2, pl3, pl4, plv, plm] = get_test_objects_plist;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 % Exception list for the UTPs:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 % [ple1,ple2,ple3,ple4,ple5,ple6] = get_test_ples();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 % Run the tests
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 results = [results utp_01]; % getInfo call
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 results = [results utp_02]; % Vector input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 results = [results utp_03]; % Matrix input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 results = [results utp_04]; % List input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 results = [results utp_05]; % Test with mixed input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 results = [results utp_06]; % Test different objects for 'val'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 disp('Done.');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 disp('******************************************************');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 elseif nargin == 1 % Check for UTP functions
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 if strcmp(varargin{1}, 'isutp')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 results = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 results = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 error('### Incorrect inputs')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 %% UTP_01
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 % Tests that the getInfo call works for this method.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 function result = utp_01
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 % Test that the getInfo call works for no sets, all sets, and each set
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 % individually.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 class = 'plist';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 mthd = 'plist2cmds';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 % Call for no sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 io(1) = eval([class '.getInfo(''' mthd ''', ''None'')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 % Call for all sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 io(2) = eval([class '.getInfo(''' mthd ''')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 % Call for each set
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 for kk=1:numel(io(2).sets)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 io(kk+2) = eval([class '.getInfo(''' mthd ''', ''' io(2).sets{kk} ''')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 % 1) Check that getInfo call returned an minfo object in all cases.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 % 2) Check that all plists have the correct parameters.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 % check we have minfo objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 if isa(io, 'minfo')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 % SET 'None'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 if ~isempty(io(1).sets), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 if ~isempty(io(1).plists), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 % Check all Sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 if ~any(strcmpi(io(2).sets, 'Default')), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 if numel(io(2).plists) ~= numel(io(2).sets), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 % SET 'Default'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 if io(3).plists.nparams ~= 0, atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 % Check key
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 % Check default value
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 % Check options
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 end % END UTP_01
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 %% UTP_02
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 % Tests that the plist2cmds method works with a vector of PLIST objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 function result = utp_02
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 % The plist2cmds method doesn't works for a vector of PLIST objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 % 1) Nothing to test.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 end % END UTP_02
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 %% UTP_03
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 % Tests that the plist2cmds method works with a matrix of PLIST objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 function result = utp_03
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 % The plist2cmds method doesn't works for a matrix of PLIST objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 % 1) Nothing to test.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 end % END UTP_03
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 %% UTP_04
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 % Tests that the plist2cmds method works with a list of PLIST objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 function result = utp_04
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 % The plist2cmds method doesn't works for a list of PLIST objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 % 1) Nothing to test.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 end % END UTP_04
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 %% UTP_05
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 % Tests that the plist2cmds method works with a mix of different shaped
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 % PLIST objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 function result = utp_05
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 % The plist2cmds method doesn't works with an input of matrices and vectors
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 % and single PLIST objects.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 % 1) Nothing to test
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 end % END UTP_05
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 %% UTP_06
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 % Tests that the plist2cmds method accepts different objects for the 'val' property.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 function result = utp_06
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310 % Create a plist with all possible objects for the 'val' property.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 [ple1,ple2,ple3,ple4,ple5,ple6] = get_test_ples();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 iir = miir(plist('type', 'lowpass'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 a = 'char';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 b = [1 2i 3; 4i 5 6];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 c = [true false true; false true false];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 d = java.util.TimeZone.getTimeZone('UTC');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323 e = sym('[a b c; d e f]');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 f = plist('a', 'char', 'b', ao(8)+ao(9));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325 g = iir.resp;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326 h = unit('m^-1/2 kg V^3/7');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 ii = [pz(3) pz(1,2) pz(1-2i) pz(-3)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 j = [time(123) time('14:00:00')];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329 k = [specwin('Kaiser', 10, 100) specwin('Hanning', 100)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 % --- CHAR
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 pl1 = plist('key', 'this is a char');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332 % --- NUMERIC
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 pl2 = plist('key', [1 2i 3; 4i 5 6]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334 % --- LOGICAL
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335 pl3 = plist('key', [true false true; false true false]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 % --- JAVA (timezone)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 pl4 = plist('key', java.util.TimeZone.getTimeZone('UTC'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 % --- SYM
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339 pl5 = plist('key', sym('[a b c; d e f]'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 % --- PLIST
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341 pl6 = plist('key', plist('a', 'char'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342 % --- CELL
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 cellval = {a b c d e f g h ii j k (ao(8) + ao(9))};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 pl7 = plist('key', cellval);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345 % --- STRUCT
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 structval.a = a;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347 structval.b = b;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 structval.c = c;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 structval.d = d;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350 structval.e = e;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 structval.f = f;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 structval.g = g;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 structval.h = h;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 structval.ii = ii;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355 structval.j = j;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 structval.k = k;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357 pl8 = plist('key', structval);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 % --- LTPDA_NUO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359 % ------ HISTORY
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 iir = miir(plist('type', 'lowpass'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 pl9 = plist('key', iir.hist);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362 % ------ UNITS
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363 pl10 = plist('key', unit('m^-1/2 kg V^3/7'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 % ------ PARAM
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365 pl11 = plist('key', param('a', 'char'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 % ------ PROVENANCE
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367 pl12 = plist('key', provenance);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 % ------ PZ
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
369 pl13 = plist('key', [pz(3) pz(1,2) pz(1-2i) pz(-3)]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 % ------ TIME
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371 pl14 = plist('key', [time(123) time('14:00:00')]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372 % ------ SPECWIN
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373 pl15 = plist('key', [specwin('Kaiser', 10, 100) specwin('Hanning', 100)]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375 pl = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 % Evaluate the commands
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377 % The result is stored in the variable 'pl'.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 out1 = pl1.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379 eval(out1{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380 out1 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 out2 = pl2.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382 eval(out2{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383 out2 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 out3 = pl3.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385 eval(out3{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386 out3 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387 out4 = pl4.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388 eval(out4{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389 out4 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390 out5 = pl5.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391 eval(out5{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392 out5 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393 out6 = pl6.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394 eval(out6{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395 out6 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396 out7 = pl7.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397 for pp = numel(out7):-1:1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 eval(out7{pp})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400 out7 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401 out8 = pl8.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402 for pp = numel(out8):-1:1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403 eval(out8{pp})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
404 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
405 out8 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
406 out9 = pl9.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
407 for pp = numel(out9):-1:1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
408 eval(out9{pp})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
409 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
410 out9 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
411 out10 = pl10.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
412 eval(out10{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
413 out10 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
414 out11 = pl11.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
415 eval(out11{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
416 out11 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
417 out12 = pl12.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
418 eval(out12{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
419 out12 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
420 out13 = pl13.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
421 eval(out13{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
422 out13 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
423 out14 = pl14.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
424 eval(out14{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
425 out14 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
426 out15 = pl15.plist2cmds;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
427 eval(out15{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
428 out15 = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
429 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
430 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
431 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
432 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
433 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
434
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
435 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
436 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
437 % 1) Check that the output is a executable plist2cmds
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
438 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
439 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
440
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
441 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
442 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
443 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
444 if ~eq(pl1, out1, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
445 if ~eq(pl2, out2, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
446 if ~eq(pl3, out3, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
447 if ~eq(pl4, out4, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
448 if ~eq(pl5, out5, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
449 if ~eq(pl6, out6, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
450 if ~eq(pl7, out7, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
451 if ~eq(pl8, out8, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
452 if ~eq(pl10, out10, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
453 if ~eq(pl11, out11, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
454 if ~eq(pl12, out12, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
455 if ~eq(pl13, out13, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
456 if ~eq(pl14, out14, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
457 if ~eq(pl15, out15, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
458 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
459 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
460 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
461 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
462
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
463 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
464 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
465 end % END UTP_06
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
466
|