Skip to content

Commit df13f5f

Browse files
committed
test: add test.ts
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 0ccafd6 commit df13f5f

File tree

1 file changed

+359
-0
lines changed
  • lib/node_modules/@stdlib/lapack/base/zlaswp/docs/types

1 file changed

+359
-0
lines changed
Lines changed: 359 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,359 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2024 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
import Complex128Array = require( '@stdlib/array/complex128' );
20+
import zlaswp = require( './index' );
21+
22+
23+
// TESTS //
24+
25+
// The function returns a Complex128Array...
26+
{
27+
const IPIV = new Int32Array( 3 );
28+
const A = new Complex128Array( 6 );
29+
30+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectType Complex128Array
31+
}
32+
33+
// The compiler throws an error if the function is provided a first argument which is not a string...
34+
{
35+
const IPIV = new Int32Array( 3 );
36+
const A = new Complex128Array( 6 );
37+
38+
zlaswp( 5, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
39+
zlaswp( true, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
40+
zlaswp( false, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
41+
zlaswp( null, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
42+
zlaswp( void 0, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
43+
zlaswp( [], 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
44+
zlaswp( {}, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
45+
zlaswp( ( x: number ): number => x, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
46+
}
47+
48+
// The compiler throws an error if the function is provided a second argument which is not a number...
49+
{
50+
const IPIV = new Int32Array( 3 );
51+
const A = new Complex128Array( 6 );
52+
53+
zlaswp( 'column-major', '5', A, 2, 0, 2, IPIV, 1 ); // $ExpectError
54+
zlaswp( 'column-major', true, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
55+
zlaswp( 'column-major', false, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
56+
zlaswp( 'column-major', null, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
57+
zlaswp( 'column-major', void 0, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
58+
zlaswp( 'column-major', [], A, 2, 0, 2, IPIV, 1 ); // $ExpectError
59+
zlaswp( 'column-major', {}, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
60+
zlaswp( 'column-major', ( x: number ): number => x, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
61+
}
62+
63+
// The compiler throws an error if the function is provided a third argument which is not a Complex128Array...
64+
{
65+
const IPIV = new Int32Array( 3 );
66+
67+
zlaswp( 'column-major', 3, '5', 2, 0, 2, IPIV, 1 ); // $ExpectError
68+
zlaswp( 'column-major', 3, 5, 2, 0, 2, IPIV, 1 ); // $ExpectError
69+
zlaswp( 'column-major', 3, true, 2, 0, 2, IPIV, 1 ); // $ExpectError
70+
zlaswp( 'column-major', 3, false, 2, 0, 2, IPIV, 1 ); // $ExpectError
71+
zlaswp( 'column-major', 3, null, 2, 0, 2, IPIV, 1 ); // $ExpectError
72+
zlaswp( 'column-major', 3, void 0, 2, 0, 2, IPIV, 1 ); // $ExpectError
73+
zlaswp( 'column-major', 3, [], 2, 0, 2, IPIV, 1 ); // $ExpectError
74+
zlaswp( 'column-major', 3, {}, 2, 0, 2, IPIV, 1 ); // $ExpectError
75+
zlaswp( 'column-major', 3, ( x: number ): number => x, 2, 0, 2, IPIV, 1 ); // $ExpectError
76+
}
77+
78+
// The compiler throws an error if the function is provided a fourth argument which is not a number...
79+
{
80+
const IPIV = new Int32Array( 3 );
81+
const A = new Complex128Array( 6 );
82+
83+
zlaswp( 'column-major', 3, A, '5', 0, 2, IPIV, 1 ); // $ExpectError
84+
zlaswp( 'column-major', 3, A, true, 0, 2, IPIV, 1 ); // $ExpectError
85+
zlaswp( 'column-major', 3, A, false, 0, 2, IPIV, 1 ); // $ExpectError
86+
zlaswp( 'column-major', 3, A, null, 0, 2, IPIV, 1 ); // $ExpectError
87+
zlaswp( 'column-major', 3, A, void 0, 0, 2, IPIV, 1 ); // $ExpectError
88+
zlaswp( 'column-major', 3, A, [], 0, 2, IPIV, 1 ); // $ExpectError
89+
zlaswp( 'column-major', 3, A, {}, 0, 2, IPIV, 1 ); // $ExpectError
90+
zlaswp( 'column-major', 3, A, ( x: number ): number => x, 0, 2, IPIV, 1 ); // $ExpectError
91+
}
92+
93+
// The compiler throws an error if the function is provided a fifth argument which is not a number...
94+
{
95+
const IPIV = new Int32Array( 3 );
96+
const A = new Complex128Array( 6 );
97+
98+
zlaswp( 'column-major', 3, A, 2, '5', 2, IPIV, 1 ); // $ExpectError
99+
zlaswp( 'column-major', 3, A, 2, true, 2, IPIV, 1 ); // $ExpectError
100+
zlaswp( 'column-major', 3, A, 2, false, 2, IPIV, 1 ); // $ExpectError
101+
zlaswp( 'column-major', 3, A, 2, null, 2, IPIV, 1 ); // $ExpectError
102+
zlaswp( 'column-major', 3, A, 2, void 0, 2, IPIV, 1 ); // $ExpectError
103+
zlaswp( 'column-major', 3, A, 2, [], 2, IPIV, 1 ); // $ExpectError
104+
zlaswp( 'column-major', 3, A, 2, {}, 2, IPIV, 1 ); // $ExpectError
105+
zlaswp( 'column-major', 3, A, 2, ( x: number ): number => x, 2, IPIV, 1 ); // $ExpectError
106+
}
107+
108+
// The compiler throws an error if the function is provided a sixth argument which is not a number...
109+
{
110+
const IPIV = new Int32Array( 3 );
111+
const A = new Complex128Array( 6 );
112+
113+
zlaswp( 'column-major', 3, A, 2, 0, '5', IPIV, 1 ); // $ExpectError
114+
zlaswp( 'column-major', 3, A, 2, 0, true, IPIV, 1 ); // $ExpectError
115+
zlaswp( 'column-major', 3, A, 2, 0, false, IPIV, 1 ); // $ExpectError
116+
zlaswp( 'column-major', 3, A, 2, 0, null, IPIV, 1 ); // $ExpectError
117+
zlaswp( 'column-major', 3, A, 2, 0, void 0, IPIV, 1 ); // $ExpectError
118+
zlaswp( 'column-major', 3, A, 2, 0, [], IPIV, 1 ); // $ExpectError
119+
zlaswp( 'column-major', 3, A, 2, 0, {}, IPIV, 1 ); // $ExpectError
120+
zlaswp( 'column-major', 3, A, 2, 0, ( x: number ): number => x, IPIV, 1 ); // $ExpectError
121+
}
122+
123+
// The compiler throws an error if the function is provided a seventh argument which is not an Int32Array...
124+
{
125+
const A = new Complex128Array( 6 );
126+
127+
zlaswp( 'column-major', 3, A, 2, 0, 2, '5', 1 ); // $ExpectError
128+
zlaswp( 'column-major', 3, A, 2, 0, 2, 5, 1 ); // $ExpectError
129+
zlaswp( 'column-major', 3, A, 2, 0, 2, true, 1 ); // $ExpectError
130+
zlaswp( 'column-major', 3, A, 2, 0, 2, false, 1 ); // $ExpectError
131+
zlaswp( 'column-major', 3, A, 2, 0, 2, null, 1 ); // $ExpectError
132+
zlaswp( 'column-major', 3, A, 2, 0, 2, void 0, 1 ); // $ExpectError
133+
zlaswp( 'column-major', 3, A, 2, 0, 2, [], 1 ); // $ExpectError
134+
zlaswp( 'column-major', 3, A, 2, 0, 2, {}, 1 ); // $ExpectError
135+
zlaswp( 'column-major', 3, A, 2, 0, 2, ( x: number ): number => x, 1 ); // $ExpectError
136+
}
137+
138+
// The compiler throws an error if the function is provided an eighth argument which is not a number...
139+
{
140+
const IPIV = new Int32Array( 3 );
141+
const A = new Complex128Array( 6 );
142+
143+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, '5' ); // $ExpectError
144+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, true ); // $ExpectError
145+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, false ); // $ExpectError
146+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, null ); // $ExpectError
147+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, void 0 ); // $ExpectError
148+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, [] ); // $ExpectError
149+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, {} ); // $ExpectError
150+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, ( x: number ): number => x ); // $ExpectError
151+
}
152+
153+
// The compiler throws an error if the function is provided an unsupported number of arguments...
154+
{
155+
const IPIV = new Int32Array( 3 );
156+
const A = new Complex128Array( 6 );
157+
158+
zlaswp(); // $ExpectError
159+
zlaswp( 'column-major' ); // $ExpectError
160+
zlaswp( 'column-major', 3 ); // $ExpectError
161+
zlaswp( 'column-major', 3, A ); // $ExpectError
162+
zlaswp( 'column-major', 3, A, 2 ); // $ExpectError
163+
zlaswp( 'column-major', 3, A, 2, 0 ); // $ExpectError
164+
zlaswp( 'column-major', 3, A, 2, 0, 2 ); // $ExpectError
165+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV ); // $ExpectError
166+
zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, 1, 10 ); // $ExpectError
167+
}
168+
169+
// Attached to main export is an `ndarray` method which returns a Complex128Array...
170+
{
171+
const IPIV = new Int32Array( 3 );
172+
const A = new Complex128Array( 6 );
173+
174+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectType Complex128Array
175+
}
176+
177+
// The compiler throws an error if the function is provided a first argument which is not a number...
178+
{
179+
const IPIV = new Int32Array( 3 );
180+
const A = new Complex128Array( 6 );
181+
182+
zlaswp.ndarray( '5', A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
183+
zlaswp.ndarray( true, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
184+
zlaswp.ndarray( false, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
185+
zlaswp.ndarray( null, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
186+
zlaswp.ndarray( void 0, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
187+
zlaswp.ndarray( [], A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
188+
zlaswp.ndarray( {}, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
189+
zlaswp.ndarray( ( x: number ): number => x, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
190+
}
191+
192+
// The compiler throws an error if the function is provided a second argument which is not a Complex128Array...
193+
{
194+
const IPIV = new Int32Array( 3 );
195+
196+
zlaswp.ndarray( 2, '5', 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
197+
zlaswp.ndarray( 2, 5, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
198+
zlaswp.ndarray( 2, true, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
199+
zlaswp.ndarray( 2, false, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
200+
zlaswp.ndarray( 2, null, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
201+
zlaswp.ndarray( 2, void 0, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
202+
zlaswp.ndarray( 2, [], 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
203+
zlaswp.ndarray( 2, {}, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
204+
zlaswp.ndarray( 2, ( x: number ): number => x, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
205+
}
206+
207+
// The compiler throws an error if the function is provided a third argument which is not a number...
208+
{
209+
const IPIV = new Int32Array( 3 );
210+
const A = new Complex128Array( 6 );
211+
212+
zlaswp.ndarray( 2, A, '5', 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
213+
zlaswp.ndarray( 2, A, true, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
214+
zlaswp.ndarray( 2, A, false, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
215+
zlaswp.ndarray( 2, A, null, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
216+
zlaswp.ndarray( 2, A, void 0, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
217+
zlaswp.ndarray( 2, A, [], 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
218+
zlaswp.ndarray( 2, A, {}, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
219+
zlaswp.ndarray( 2, A, ( x: number ): number => x, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
220+
}
221+
222+
// The compiler throws an error if the function is provided a fourth argument which is not a number...
223+
{
224+
const IPIV = new Int32Array( 3 );
225+
const A = new Complex128Array( 6 );
226+
227+
zlaswp.ndarray( 2, A, 2, '5', 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
228+
zlaswp.ndarray( 2, A, 2, true, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
229+
zlaswp.ndarray( 2, A, 2, false, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
230+
zlaswp.ndarray( 2, A, 2, null, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
231+
zlaswp.ndarray( 2, A, 2, void 0, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
232+
zlaswp.ndarray( 2, A, 2, [], 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
233+
zlaswp.ndarray( 2, A, 2, {}, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
234+
zlaswp.ndarray( 2, A, 2, ( x: number ): number => x, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
235+
}
236+
237+
// The compiler throws an error if the function is provided a fifth argument which is not a number...
238+
{
239+
const IPIV = new Int32Array( 3 );
240+
const A = new Complex128Array( 6 );
241+
242+
zlaswp.ndarray( 2, A, 2, 1, '5', 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
243+
zlaswp.ndarray( 2, A, 2, 1, true, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
244+
zlaswp.ndarray( 2, A, 2, 1, false, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
245+
zlaswp.ndarray( 2, A, 2, 1, null, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
246+
zlaswp.ndarray( 2, A, 2, 1, void 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
247+
zlaswp.ndarray( 2, A, 2, 1, [], 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
248+
zlaswp.ndarray( 2, A, 2, 1, {}, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
249+
zlaswp.ndarray( 2, A, 2, 1, ( x: number ): number => x, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
250+
}
251+
252+
// The compiler throws an error if the function is provided a sixth argument which is not a number...
253+
{
254+
const IPIV = new Int32Array( 3 );
255+
const A = new Complex128Array( 6 );
256+
257+
zlaswp.ndarray( 2, A, 2, 1, 0, '5', 2, 1, IPIV, 1, 0 ); // $ExpectError
258+
zlaswp.ndarray( 2, A, 2, 1, 0, true, 2, 1, IPIV, 1, 0 ); // $ExpectError
259+
zlaswp.ndarray( 2, A, 2, 1, 0, false, 2, 1, IPIV, 1, 0 ); // $ExpectError
260+
zlaswp.ndarray( 2, A, 2, 1, 0, null, 2, 1, IPIV, 1, 0 ); // $ExpectError
261+
zlaswp.ndarray( 2, A, 2, 1, 0, void 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
262+
zlaswp.ndarray( 2, A, 2, 1, 0, [], 2, 1, IPIV, 1, 0 ); // $ExpectError
263+
zlaswp.ndarray( 2, A, 2, 1, 0, {}, 2, 1, IPIV, 1, 0 ); // $ExpectError
264+
zlaswp.ndarray( 2, A, 2, 1, 0, ( x: number ): number => x, 2, 1, IPIV, 1, 0 ); // $ExpectError
265+
}
266+
267+
// The compiler throws an error if the function is provided a seventh argument which is not a number...
268+
{
269+
const IPIV = new Int32Array( 3 );
270+
const A = new Complex128Array( 6 );
271+
272+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, '5', 1, IPIV, 1, 0 ); // $ExpectError
273+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, true, 1, IPIV, 1, 0 ); // $ExpectError
274+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, false, 1, IPIV, 1, 0 ); // $ExpectError
275+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, null, 1, IPIV, 1, 0 ); // $ExpectError
276+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, void 0, 1, IPIV, 1, 0 ); // $ExpectError
277+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, [], 1, IPIV, 1, 0 ); // $ExpectError
278+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, {}, 1, IPIV, 1, 0 ); // $ExpectError
279+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, ( x: number ): number => x, 1, IPIV, 1, 0 ); // $ExpectError
280+
}
281+
282+
// The compiler throws an error if the function is provided an eighth argument which is not a number...
283+
{
284+
const IPIV = new Int32Array( 3 );
285+
const A = new Complex128Array( 6 );
286+
287+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, '5', IPIV, 1, 0 ); // $ExpectError
288+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, true, IPIV, 1, 0 ); // $ExpectError
289+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, false, IPIV, 1, 0 ); // $ExpectError
290+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, null, IPIV, 1, 0 ); // $ExpectError
291+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, void 0, IPIV, 1, 0 ); // $ExpectError
292+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, [], IPIV, 1, 0 ); // $ExpectError
293+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, {}, IPIV, 1, 0 ); // $ExpectError
294+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, ( x: number ): number => x, IPIV, 1, 0 ); // $ExpectError
295+
}
296+
297+
// The compiler throws an error if the function is provided a ninth argument which is not an Int32Array...
298+
{
299+
const A = new Complex128Array( 6 );
300+
301+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, '5', 1, 0 ); // $ExpectError
302+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, 5, 1, 0 ); // $ExpectError
303+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, true, 1, 0 ); // $ExpectError
304+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, false, 1, 0 ); // $ExpectError
305+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, null, 1, 0 ); // $ExpectError
306+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, void 0, 1, 0 ); // $ExpectError
307+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, [], 1, 0 ); // $ExpectError
308+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, {}, 1, 0 ); // $ExpectError
309+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, ( x: number ): number => x, 1, 0 ); // $ExpectError
310+
}
311+
312+
// The compiler throws an error if the function is provided a tenth argument which is not a number...
313+
{
314+
const IPIV = new Int32Array( 3 );
315+
const A = new Complex128Array( 6 );
316+
317+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, '5', 0 ); // $ExpectError
318+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, true, 0 ); // $ExpectError
319+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, false, 0 ); // $ExpectError
320+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, null, 0 ); // $ExpectError
321+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, void 0, 0 ); // $ExpectError
322+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, [], 0 ); // $ExpectError
323+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, {}, 0 ); // $ExpectError
324+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, ( x: number ): number => x, 0 ); // $ExpectError
325+
}
326+
327+
// The compiler throws an error if the function is provided an eleventh argument which is not a number...
328+
{
329+
const IPIV = new Int32Array( 3 );
330+
const A = new Complex128Array( 6 );
331+
332+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, '5' ); // $ExpectError
333+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, true ); // $ExpectError
334+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, false ); // $ExpectError
335+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, null ); // $ExpectError
336+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, void 0 ); // $ExpectError
337+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, [] ); // $ExpectError
338+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, {} ); // $ExpectError
339+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, ( x: number ): number => x ); // $ExpectError
340+
}
341+
342+
// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
343+
{
344+
const IPIV = new Int32Array( 3 );
345+
const A = new Complex128Array( 6 );
346+
347+
zlaswp.ndarray(); // $ExpectError
348+
zlaswp.ndarray( 2 ); // $ExpectError
349+
zlaswp.ndarray( 2, A ); // $ExpectError
350+
zlaswp.ndarray( 2, A, 2 ); // $ExpectError
351+
zlaswp.ndarray( 2, A, 2, 1 ); // $ExpectError
352+
zlaswp.ndarray( 2, A, 2, 1, 0 ); // $ExpectError
353+
zlaswp.ndarray( 2, A, 2, 1, 0, 0 ); // $ExpectError
354+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2 ); // $ExpectError
355+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1 ); // $ExpectError
356+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV ); // $ExpectError
357+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1 ); // $ExpectError
358+
zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0, 10 ); // $ExpectError
359+
}

0 commit comments

Comments
 (0)