5590
|
1 %% Automatically generated from DejaGNU files |
|
2 |
|
3 %% test/octave.test/index-wfi-t/s-1.m |
|
4 %!test |
|
5 %! wfi = warn_fortran_indexing; |
|
6 %! warn_fortran_indexing = 1; |
|
7 %! a = []; |
|
8 %! assert(isempty (a)); |
|
9 %! warn_fortran_indexing = wfi; |
|
10 |
|
11 %% test/octave.test/index-wfi-t/s-2.m |
|
12 %!test |
|
13 %! wfi = warn_fortran_indexing; |
|
14 %! warn_fortran_indexing = 1; |
|
15 %! a = 1; |
|
16 %! assert(a(1),1); |
|
17 %! warn_fortran_indexing = wfi; |
|
18 %! warn_fortran_indexing = wfi; |
|
19 |
|
20 %% test/octave.test/index-wfi-t/s-3.m |
|
21 %!test |
|
22 %! wfi = warn_fortran_indexing; |
|
23 %! warn_fortran_indexing = 1; |
|
24 %! a = 1; |
|
25 %! assert(a(:),1); |
|
26 %! warn_fortran_indexing = wfi; |
|
27 |
|
28 %% test/octave.test/index-wfi-t/s-4.m |
|
29 %!test |
|
30 %! wfi = warn_fortran_indexing; |
|
31 %! warn_fortran_indexing = 1; |
|
32 %! a = 1; |
|
33 %! assert(a(:,:),1); |
|
34 %! warn_fortran_indexing = wfi; |
|
35 |
|
36 %% test/octave.test/index-wfi-t/s-5.m |
|
37 %!test |
|
38 %! wfi = warn_fortran_indexing; |
|
39 %! warn_fortran_indexing = 1; |
|
40 %! a = 1; |
|
41 %! assert(a(1,:),1); |
|
42 %! warn_fortran_indexing = wfi; |
|
43 |
|
44 %% test/octave.test/index-wfi-t/s-6.m |
|
45 %!test |
|
46 %! wfi = warn_fortran_indexing; |
|
47 %! warn_fortran_indexing = 1; |
|
48 %! a = 1; |
|
49 %! assert(a(:,1),1); |
|
50 %! warn_fortran_indexing = wfi; |
|
51 |
|
52 %% test/octave.test/index-wfi-t/s-7.m |
|
53 %!test |
|
54 %! wfi = warn_fortran_indexing; |
|
55 %! warn_fortran_indexing = 1; |
|
56 %! a = 1; |
|
57 %! assert(isempty (a(logical (0)))); |
|
58 %! warn_fortran_indexing = wfi; |
|
59 |
|
60 %% test/octave.test/index-wfi-t/s-8.m |
|
61 %!test |
|
62 %! wfi = warn_fortran_indexing; |
|
63 %! warn_fortran_indexing = 1; |
|
64 %! a = 1; |
|
65 %! fail("a(-1);"); |
|
66 %! warn_fortran_indexing = wfi; |
|
67 |
|
68 %% test/octave.test/index-wfi-t/s-9.m |
|
69 %!test |
|
70 %! wfi = warn_fortran_indexing; |
|
71 %! warn_fortran_indexing = 1; |
|
72 %! a = 1; |
|
73 %! fail("a(2);"); |
|
74 %! warn_fortran_indexing = wfi; |
|
75 |
|
76 %% test/octave.test/index-wfi-t/s-10.m |
|
77 %!test |
|
78 %! wfi = warn_fortran_indexing; |
|
79 %! warn_fortran_indexing = 1; |
|
80 %! a = 1; |
|
81 %! fail("a(2,:);"); |
|
82 %! warn_fortran_indexing = wfi; |
|
83 |
|
84 %% test/octave.test/index-wfi-t/s-11.m |
|
85 %!test |
|
86 %! wfi = warn_fortran_indexing; |
|
87 %! warn_fortran_indexing = 1; |
|
88 %! a = 1; |
|
89 %! fail("a(:,2);"); |
|
90 %! warn_fortran_indexing = wfi; |
|
91 |
|
92 %% test/octave.test/index-wfi-t/s-12.m |
|
93 %!test |
|
94 %! wfi = warn_fortran_indexing; |
|
95 %! warn_fortran_indexing = 1; |
|
96 %! a = 1; |
|
97 %! fail("a(-1,:);"); |
|
98 %! warn_fortran_indexing = wfi; |
|
99 |
|
100 %% test/octave.test/index-wfi-t/s-13.m |
|
101 %!test |
|
102 %! wfi = warn_fortran_indexing; |
|
103 %! warn_fortran_indexing = 1; |
|
104 %! a = 1; |
|
105 %! fail("a(:,-1);"); |
|
106 %! warn_fortran_indexing = wfi; |
|
107 |
|
108 %% test/octave.test/index-wfi-t/s-14.m |
|
109 %!test |
|
110 %! wfi = warn_fortran_indexing; |
|
111 %! warn_fortran_indexing = 1; |
|
112 %! a = 1; |
|
113 %! fail("a([1,2,3]);"); |
|
114 %! warn_fortran_indexing = wfi; |
|
115 |
|
116 %% test/octave.test/index-wfi-t/s-15.m |
|
117 %!test |
|
118 %! wfi = warn_fortran_indexing; |
|
119 %! warn_fortran_indexing = 1; |
|
120 %! a = 1; |
|
121 %! fail("a([1;2;3]);"); |
|
122 %! warn_fortran_indexing = wfi; |
|
123 |
|
124 %% test/octave.test/index-wfi-t/s-16.m |
|
125 %!test |
|
126 %! wfi = warn_fortran_indexing; |
|
127 %! warn_fortran_indexing = 1; |
|
128 %! a = 1; |
|
129 %! fail("a([1,2;3,4]);"); |
|
130 %! warn_fortran_indexing = wfi; |
|
131 |
|
132 %% test/octave.test/index-wfi-t/s-17.m |
|
133 %!test |
|
134 %! wfi = warn_fortran_indexing; |
|
135 %! warn_fortran_indexing = 1; |
|
136 %! a = 1; |
|
137 %! fail("a([0,1]);"); |
|
138 %! warn_fortran_indexing = wfi; |
|
139 |
|
140 %% test/octave.test/index-wfi-t/s-18.m |
|
141 %!test |
|
142 %! wfi = warn_fortran_indexing; |
|
143 %! warn_fortran_indexing = 1; |
|
144 %! a = 1; |
|
145 %! fail("a([0;1]);"); |
|
146 %! warn_fortran_indexing = wfi; |
|
147 |
|
148 %% test/octave.test/index-wfi-t/s-19.m |
|
149 %!test |
|
150 %! wfi = warn_fortran_indexing; |
|
151 %! warn_fortran_indexing = 1; |
|
152 %! a = 1; |
|
153 %! fail("a([-1,0]);"); |
|
154 %! warn_fortran_indexing = wfi; |
|
155 |
|
156 %% test/octave.test/index-wfi-t/s-20.m |
|
157 %!test |
|
158 %! wfi = warn_fortran_indexing; |
|
159 %! warn_fortran_indexing = 1; |
|
160 %! a = 1; |
|
161 %! fail("a([-1;0]);"); |
|
162 %! warn_fortran_indexing = wfi; |
|
163 |
|
164 %% test/octave.test/index-wfi-t/v-1.m |
|
165 %!test |
|
166 %! wfi = warn_fortran_indexing; |
|
167 %! warn_fortran_indexing = 1; |
|
168 %! a = [4,3,2,1]; |
|
169 %! a_prime = [4;3;2;1]; |
|
170 %! mid_a = [3,2]; |
|
171 %! assert(a(1),4); |
|
172 %! warn_fortran_indexing = wfi; |
|
173 |
|
174 %% test/octave.test/index-wfi-t/v-2.m |
|
175 %!test |
|
176 %! wfi = warn_fortran_indexing; |
|
177 %! warn_fortran_indexing = 1; |
|
178 %! a = [4,3,2,1]; |
|
179 %! a_prime = [4;3;2;1]; |
|
180 %! mid_a = [3,2]; |
|
181 %! assert(a(2),3); |
|
182 %! warn_fortran_indexing = wfi; |
|
183 |
|
184 %% test/octave.test/index-wfi-t/v-3.m |
|
185 %!test |
|
186 %! wfi = warn_fortran_indexing; |
|
187 %! warn_fortran_indexing = 1; |
|
188 %! a = [4,3,2,1]; |
|
189 %! a_prime = [4;3;2;1]; |
|
190 %! mid_a = [3,2]; |
|
191 %! assert(all (a(:) == a_prime)); |
|
192 %! warn_fortran_indexing = wfi; |
|
193 |
|
194 %% test/octave.test/index-wfi-t/v-4.m |
|
195 %!test |
|
196 %! wfi = warn_fortran_indexing; |
|
197 %! warn_fortran_indexing = 1; |
|
198 %! a = [4,3,2,1]; |
|
199 %! a_prime = [4;3;2;1]; |
|
200 %! mid_a = [3,2]; |
|
201 %! assert(all (a(1,:) == a)); |
|
202 %! warn_fortran_indexing = wfi; |
|
203 |
|
204 %% test/octave.test/index-wfi-t/v-5.m |
|
205 %!test |
|
206 %! wfi = warn_fortran_indexing; |
|
207 %! warn_fortran_indexing = 1; |
|
208 %! a = [4,3,2,1]; |
|
209 %! a_prime = [4;3;2;1]; |
|
210 %! mid_a = [3,2]; |
|
211 %! assert(a(:,3),2); |
|
212 %! warn_fortran_indexing = wfi; |
|
213 |
|
214 %% test/octave.test/index-wfi-t/v-6.m |
|
215 %!test |
|
216 %! wfi = warn_fortran_indexing; |
|
217 %! warn_fortran_indexing = 1; |
|
218 %! a = [4,3,2,1]; |
|
219 %! a_prime = [4;3;2;1]; |
|
220 %! mid_a = [3,2]; |
|
221 %! assert(all (a(:,:) == a)); |
|
222 %! warn_fortran_indexing = wfi; |
|
223 |
|
224 %% test/octave.test/index-wfi-t/v-7.m |
|
225 %!test |
|
226 %! wfi = warn_fortran_indexing; |
|
227 %! warn_fortran_indexing = 1; |
|
228 %! a = [4,3,2,1]; |
|
229 %! a_prime = [4;3;2;1]; |
|
230 %! mid_a = [3,2]; |
|
231 %! assert(all (a(logical ([0,1,1,0])) == mid_a)); |
|
232 %! warn_fortran_indexing = wfi; |
|
233 |
|
234 %% test/octave.test/index-wfi-t/v-8.m |
|
235 %!test |
|
236 %! wfi = warn_fortran_indexing; |
|
237 %! warn_fortran_indexing = 1; |
|
238 %! a = [4,3,2,1]; |
|
239 %! a_prime = [4;3;2;1]; |
|
240 %! mid_a = [3,2]; |
|
241 %! fail("a(0);"); |
|
242 %! warn_fortran_indexing = wfi; |
|
243 |
|
244 %% test/octave.test/index-wfi-t/v-9.m |
|
245 %!test |
|
246 %! wfi = warn_fortran_indexing; |
|
247 %! warn_fortran_indexing = 1; |
|
248 %! a = [4,3,2,1]; |
|
249 %! a_prime = [4;3;2;1]; |
|
250 %! mid_a = [3,2]; |
|
251 %! fail("a(5);"); |
|
252 %! warn_fortran_indexing = wfi; |
|
253 |
|
254 %% test/octave.test/index-wfi-t/v-10.m |
|
255 %!test |
|
256 %! wfi = warn_fortran_indexing; |
|
257 %! warn_fortran_indexing = 1; |
|
258 %! a = [4,3,2,1]; |
|
259 %! a_prime = [4;3;2;1]; |
|
260 %! mid_a = [3,2]; |
|
261 %! fail("a(0,1);"); |
|
262 %! warn_fortran_indexing = wfi; |
|
263 |
|
264 %% test/octave.test/index-wfi-t/v-11.m |
|
265 %!test |
|
266 %! wfi = warn_fortran_indexing; |
|
267 %! warn_fortran_indexing = 1; |
|
268 %! a = [4,3,2,1]; |
|
269 %! a_prime = [4;3;2;1]; |
|
270 %! mid_a = [3,2]; |
|
271 %! assert(isempty (a(logical (0),:))); |
|
272 %! warn_fortran_indexing = wfi; |
|
273 |
|
274 %% test/octave.test/index-wfi-t/v-12.m |
|
275 %!test |
|
276 %! wfi = warn_fortran_indexing; |
|
277 %! warn_fortran_indexing = 1; |
|
278 %! a = [4,3,2,1]; |
|
279 %! a_prime = [4;3;2;1]; |
|
280 %! mid_a = [3,2]; |
|
281 %! fail("a(:,0);"); |
|
282 %! warn_fortran_indexing = wfi; |
|
283 |
|
284 %% test/octave.test/index-wfi-t/v-13.m |
|
285 %!test |
|
286 %! wfi = warn_fortran_indexing; |
|
287 %! warn_fortran_indexing = 1; |
|
288 %! a = [4,3,2,1]; |
|
289 %! a_prime = [4;3;2;1]; |
|
290 %! mid_a = [3,2]; |
|
291 %! assert(isempty (a([]))); |
|
292 %! warn_fortran_indexing = wfi; |
|
293 |
|
294 %% test/octave.test/index-wfi-t/v-14.m |
|
295 %!test |
|
296 %! wfi = warn_fortran_indexing; |
|
297 %! warn_fortran_indexing = 1; |
|
298 %! a = [4,3,2,1]; |
|
299 %! a_prime = [4;3;2;1]; |
|
300 %! mid_a = [3,2]; |
|
301 %! assert(isempty (a([],:))); |
|
302 %! warn_fortran_indexing = wfi; |
|
303 |
|
304 %% test/octave.test/index-wfi-t/v-15.m |
|
305 %!test |
|
306 %! wfi = warn_fortran_indexing; |
|
307 %! warn_fortran_indexing = 1; |
|
308 %! a = [4,3,2,1]; |
|
309 %! a_prime = [4;3;2;1]; |
|
310 %! mid_a = [3,2]; |
|
311 %! assert(isempty (a(:,[]))); |
|
312 %! warn_fortran_indexing = wfi; |
|
313 |
|
314 %% test/octave.test/index-wfi-t/m-1.m |
|
315 %!test |
|
316 %! wfi = warn_fortran_indexing; |
|
317 %! warn_fortran_indexing = 1; |
|
318 %! a = [1,2;3,4]; |
|
319 %! a_fvec = [1;3;2;4]; |
|
320 %! a_col_1 = [1;3]; |
|
321 %! a_col_2 = [2;4]; |
|
322 %! a_row_1 = [1,2]; |
|
323 %! a_row_2 = [3,4]; |
|
324 %! assert(all (all (a(:,:) == a))); |
|
325 %! warn_fortran_indexing = wfi; |
|
326 |
|
327 %% test/octave.test/index-wfi-t/m-2.m |
|
328 %!test |
|
329 %! wfi = warn_fortran_indexing; |
|
330 %! warn_fortran_indexing = 1; |
|
331 %! a = [1,2;3,4]; |
|
332 %! a_fvec = [1;3;2;4]; |
|
333 %! a_col_1 = [1;3]; |
|
334 %! a_col_2 = [2;4]; |
|
335 %! a_row_1 = [1,2]; |
|
336 %! a_row_2 = [3,4]; |
|
337 %! assert(all (a(:) == a_fvec)); |
|
338 %! warn_fortran_indexing = wfi; |
|
339 |
|
340 %% test/octave.test/index-wfi-t/m-3.m |
|
341 %!test |
|
342 %! wfi = warn_fortran_indexing; |
|
343 %! warn_fortran_indexing = 1; |
|
344 %! a = [1,2;3,4]; |
|
345 %! a_fvec = [1;3;2;4]; |
|
346 %! a_col_1 = [1;3]; |
|
347 %! a_col_2 = [2;4]; |
|
348 %! a_row_1 = [1,2]; |
|
349 %! a_row_2 = [3,4]; |
|
350 %! fail("a(0);"); |
|
351 %! warn_fortran_indexing = wfi; |
|
352 |
|
353 %% test/octave.test/index-wfi-t/m-4.m |
|
354 %!test |
|
355 %! wfi = warn_fortran_indexing; |
|
356 %! warn_fortran_indexing = 1; |
|
357 %! a = [1,2;3,4]; |
|
358 %! a_fvec = [1;3;2;4]; |
|
359 %! a_col_1 = [1;3]; |
|
360 %! a_col_2 = [2;4]; |
|
361 %! a_row_1 = [1,2]; |
|
362 %! a_row_2 = [3,4]; |
|
363 %! fail("a(2);","warning"); |
|
364 %! warn_fortran_indexing = wfi; |
|
365 |