7017
|
1 ## Copyright (C) 2006, 2007 John W. Eaton |
7016
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
|
6 ## under the terms of the GNU General Public License as published by |
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
|
8 ## your option) any later version. |
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
|
18 |
5590
|
19 %% Automatically generated from DejaGNU files |
|
20 |
|
21 %% test/octave.test/number/ismatrix-1.m |
|
22 %!assert(ismatrix (1)); |
|
23 |
|
24 %% test/octave.test/number/ismatrix-2.m |
|
25 %!assert(ismatrix ([1, 2, 3])); |
|
26 |
|
27 %% test/octave.test/number/ismatrix-3.m |
|
28 %% Yes, this is right, ismatrix() checks for non-empty matrices. |
|
29 %!assert( |
|
30 %! ismatrix ([]) == 0); |
|
31 |
|
32 %% test/octave.test/number/ismatrix-4.m |
|
33 %!assert(ismatrix ([1, 2; 3, 4])); |
|
34 |
|
35 %% test/octave.test/number/ismatrix-5.m |
|
36 %!test |
|
37 %! warn_str_to_num = 0; |
|
38 %! assert(!(ismatrix ("t"))); |
|
39 |
|
40 %% test/octave.test/number/ismatrix-6.m |
|
41 %!test |
|
42 %! warn_str_to_num = 0; |
|
43 %! assert(!(ismatrix ("test"))); |
|
44 |
|
45 %% test/octave.test/number/ismatrix-7.m |
|
46 %!test |
|
47 %! warn_str_to_num = 0; |
|
48 %! assert(!(ismatrix (["test"; "ing"]))); |
|
49 |
|
50 %% test/octave.test/number/ismatrix-8.m |
|
51 %!test |
|
52 %! s.a = 1; |
|
53 %! assert(!(ismatrix (s))); |
|
54 |
|
55 %% test/octave.test/number/ismatrix-9.m |
5751
|
56 %!error <Invalid call to ismatrix.*> ismatrix (); |
5590
|
57 |
|
58 %% test/octave.test/number/ismatrix-10.m |
5751
|
59 %!error <Invalid call to ismatrix.*> ismatrix ([1, 2; 3, 4], 2); |
5590
|
60 |
|
61 %% test/octave.test/number/isvector-1.m |
|
62 %!assert(isvector (1)); |
|
63 |
|
64 %% test/octave.test/number/isvector-2.m |
|
65 %!assert(isvector ([1; 2; 3])); |
|
66 |
|
67 %% test/octave.test/number/isvector-3.m |
|
68 %!assert(!(isvector ([]))); |
|
69 |
|
70 %% test/octave.test/number/isvector-4.m |
|
71 %!assert(!(isvector ([1, 2; 3, 4]))); |
|
72 |
|
73 %% test/octave.test/number/isvector-5.m |
|
74 %!test |
|
75 %! warn_str_to_num = 0; |
5728
|
76 %! assert((isvector ("t"))); |
5590
|
77 |
|
78 %% test/octave.test/number/isvector-6.m |
|
79 %!test |
|
80 %! warn_str_to_num = 0; |
5728
|
81 %! assert((isvector ("test"))); |
5590
|
82 |
|
83 %% test/octave.test/number/isvector-7.m |
|
84 %!assert(!(isvector (["test"; "ing"]))); |
|
85 |
|
86 %% test/octave.test/number/isvector-8.m |
|
87 %!test |
|
88 %! s.a = 1; |
5728
|
89 %! assert((isvector (s))); |
5590
|
90 |
|
91 %% test/octave.test/number/isvector-9.m |
|
92 %!error isvector (); |
|
93 |
|
94 %% test/octave.test/number/isvector-10.m |
|
95 %!error isvector ([1, 2], 2); |
|
96 |
|
97 %% test/octave.test/number/isscalar-1.m |
|
98 %!assert(isscalar (1)); |
|
99 |
|
100 %% test/octave.test/number/isscalar-2.m |
|
101 %!assert(!(isscalar ([1, 2]))); |
|
102 |
|
103 %% test/octave.test/number/isscalar-3.m |
|
104 %!assert(!(isscalar ([]))); |
|
105 |
|
106 %% test/octave.test/number/isscalar-4.m |
|
107 %!assert(!(isscalar ([1, 2; 3, 4]))); |
|
108 |
|
109 %% test/octave.test/number/isscalar-5.m |
|
110 %!test |
|
111 %! warn_str_to_num = 0; |
5728
|
112 %! assert((isscalar ("t"))); |
5590
|
113 |
|
114 %% test/octave.test/number/isscalar-6.m |
|
115 %!assert(!(isscalar ("test"))); |
|
116 |
|
117 %% test/octave.test/number/isscalar-7.m |
|
118 %!assert(!(isscalar (["test"; "ing"]))); |
|
119 |
|
120 %% test/octave.test/number/isscalar-8.m |
|
121 %!test |
|
122 %! s.a = 1; |
5728
|
123 %! assert((isscalar (s))); |
5590
|
124 |
|
125 %% test/octave.test/number/isscalar-9.m |
|
126 %!error isscalar (); |
|
127 |
|
128 %% test/octave.test/number/isscalar-10.m |
|
129 %!error isscalar (1, 2); |
|
130 |
|
131 %% test/octave.test/number/issquare-1.m |
|
132 %!assert(issquare (1)); |
|
133 |
|
134 %% test/octave.test/number/issquare-2.m |
|
135 %!assert(!(issquare ([1, 2]))); |
|
136 |
|
137 %% test/octave.test/number/issquare-3.m |
|
138 %!assert(!(issquare ([]))); |
|
139 |
|
140 %% test/octave.test/number/issquare-4.m |
|
141 %!assert(issquare ([1, 2; 3, 4]) == 2); |
|
142 |
|
143 %% test/octave.test/number/issquare-5.m |
|
144 %!test |
|
145 %! warn_str_to_num = 0; |
|
146 %! assert(!(issquare ("t"))); |
|
147 |
|
148 %% test/octave.test/number/issquare-6.m |
|
149 %!assert(!(issquare ("test"))); |
|
150 |
|
151 %% test/octave.test/number/issquare-7.m |
|
152 %!test |
|
153 %! warn_str_to_num = 0; |
|
154 %! assert(!(issquare (["test"; "ing"; "1"; "2"]))); |
|
155 |
|
156 %% test/octave.test/number/issquare-8.m |
|
157 %!test |
|
158 %! s.a = 1; |
|
159 %! assert(!(issquare (s))); |
|
160 |
|
161 %% test/octave.test/number/issquare-9.m |
|
162 %!assert(!(issquare ([1, 2; 3, 4; 5, 6]))); |
|
163 |
|
164 %% test/octave.test/number/issquare-10.m |
|
165 %!error issquare (); |
|
166 |
|
167 %% test/octave.test/number/issquare-11.m |
|
168 %!error issquare ([1, 2; 3, 4], 2); |
|
169 |
|
170 %% test/octave.test/number/issymmetric-1.m |
|
171 %!assert(issymmetric (1)); |
|
172 |
|
173 %% test/octave.test/number/issymmetric-2.m |
|
174 %!assert(!(issymmetric ([1, 2]))); |
|
175 |
|
176 %% test/octave.test/number/issymmetric-3.m |
|
177 %!assert(!(issymmetric ([]))); |
|
178 |
|
179 %% test/octave.test/number/issymmetric-4.m |
|
180 %!assert(issymmetric ([1, 2; 2, 1]) == 2); |
|
181 |
|
182 %% test/octave.test/number/issymmetric-5.m |
|
183 %!test |
|
184 %! warn_str_to_num = 0; |
|
185 %! assert(!(issymmetric ("t"))); |
|
186 |
|
187 %% test/octave.test/number/issymmetric-6.m |
|
188 %!assert(!(issymmetric ("test"))); |
|
189 |
|
190 %% test/octave.test/number/issymmetric-7.m |
|
191 %!test |
|
192 %! warn_str_to_num = 0; |
|
193 %! assert(!(issymmetric (["te"; "et"]))); |
|
194 |
|
195 %% test/octave.test/number/issymmetric-8.m |
|
196 %!test |
|
197 %! s.a = 1; |
|
198 %! assert(!(issymmetric (s))); |
|
199 |
|
200 %% test/octave.test/number/issymmetric-9.m |
|
201 %!assert(issymmetric ([1, 2.1; 2, 1.1], 0.2) == 2); |
|
202 |
|
203 %% test/octave.test/number/issymmetric-10.m |
|
204 %!error issymmetric ([1, 2; 2, 1], 0, 0); |
|
205 |
|
206 %% test/octave.test/number/issymmetric-11.m |
|
207 %!error issymmetric (); |
|
208 |