@@ -27,7 +27,7 @@ import zdotc = require( './index' );
2727 const x = new Complex128Array ( 10 ) ;
2828 const y = new Complex128Array ( 10 ) ;
2929
30- zdotc ( x . length , x , 1 , y , 1 ) ; // $ExpectType Complex128
30+ zdotc ( 10 , x , 1 , y , 1 ) ; // $ExpectType Complex128
3131}
3232
3333// The compiler throws an error if the function is provided a first argument which is not a number...
@@ -47,63 +47,62 @@ import zdotc = require( './index' );
4747
4848// The compiler throws an error if the function is provided a second argument which is not a Complex128Array..
4949{
50- const x = new Complex128Array ( 10 ) ;
5150 const y = new Complex128Array ( 10 ) ;
5251
53- zdotc ( x . length , 10 , 1 , y , 1 ) ; // $ExpectError
54- zdotc ( x . length , '10' , 1 , y , 1 ) ; // $ExpectError
55- zdotc ( x . length , true , 1 , y , 1 ) ; // $ExpectError
56- zdotc ( x . length , false , 1 , y , 1 ) ; // $ExpectError
57- zdotc ( x . length , null , 1 , y , 1 ) ; // $ExpectError
58- zdotc ( x . length , undefined , 1 , y , 1 ) ; // $ExpectError
59- zdotc ( x . length , [ ] , 1 , y , 1 ) ; // $ExpectError
60- zdotc ( x . length , { } , 1 , y , 1 ) ; // $ExpectError
61- zdotc ( x . length , ( x : number ) : number => x , 1 , y , 1 ) ; // $ExpectError
52+ zdotc ( 10 , 10 , 1 , y , 1 ) ; // $ExpectError
53+ zdotc ( 10 , '10' , 1 , y , 1 ) ; // $ExpectError
54+ zdotc ( 10 , true , 1 , y , 1 ) ; // $ExpectError
55+ zdotc ( 10 , false , 1 , y , 1 ) ; // $ExpectError
56+ zdotc ( 10 , null , 1 , y , 1 ) ; // $ExpectError
57+ zdotc ( 10 , undefined , 1 , y , 1 ) ; // $ExpectError
58+ zdotc ( 10 , [ ] , 1 , y , 1 ) ; // $ExpectError
59+ zdotc ( 10 , { } , 1 , y , 1 ) ; // $ExpectError
60+ zdotc ( 10 , ( x : number ) : number => x , 1 , y , 1 ) ; // $ExpectError
6261}
6362
6463// The compiler throws an error if the function is provided a third argument which is not a number...
6564{
6665 const x = new Complex128Array ( 10 ) ;
6766 const y = new Complex128Array ( 10 ) ;
6867
69- zdotc ( x . length , x , '10' , y , 1 ) ; // $ExpectError
70- zdotc ( x . length , x , true , y , 1 ) ; // $ExpectError
71- zdotc ( x . length , x , false , y , 1 ) ; // $ExpectError
72- zdotc ( x . length , x , null , y , 1 ) ; // $ExpectError
73- zdotc ( x . length , x , undefined , y , 1 ) ; // $ExpectError
74- zdotc ( x . length , x , [ ] , y , 1 ) ; // $ExpectError
75- zdotc ( x . length , x , { } , y , 1 ) ; // $ExpectError
76- zdotc ( x . length , x , ( x : number ) : number => x , y , 1 ) ; // $ExpectError
68+ zdotc ( 10 , x , '10' , y , 1 ) ; // $ExpectError
69+ zdotc ( 10 , x , true , y , 1 ) ; // $ExpectError
70+ zdotc ( 10 , x , false , y , 1 ) ; // $ExpectError
71+ zdotc ( 10 , x , null , y , 1 ) ; // $ExpectError
72+ zdotc ( 10 , x , undefined , y , 1 ) ; // $ExpectError
73+ zdotc ( 10 , x , [ ] , y , 1 ) ; // $ExpectError
74+ zdotc ( 10 , x , { } , y , 1 ) ; // $ExpectError
75+ zdotc ( 10 , x , ( x : number ) : number => x , y , 1 ) ; // $ExpectError
7776}
7877
7978// The compiler throws an error if the function is provided a fourth argument which is not a Complex128Array...
8079{
8180 const x = new Complex128Array ( 10 ) ;
8281
83- zdotc ( x . length , x , 1 , 10 , 1 ) ; // $ExpectError
84- zdotc ( x . length , x , 1 , '10' , 1 ) ; // $ExpectError
85- zdotc ( x . length , x , 1 , true , 1 ) ; // $ExpectError
86- zdotc ( x . length , x , 1 , false , 1 ) ; // $ExpectError
87- zdotc ( x . length , x , 1 , null , 1 ) ; // $ExpectError
88- zdotc ( x . length , x , 1 , undefined , 1 ) ; // $ExpectError
89- zdotc ( x . length , x , 1 , [ ] , 1 ) ; // $ExpectError
90- zdotc ( x . length , x , 1 , { } , 1 ) ; // $ExpectError
91- zdotc ( x . length , x , 1 , ( x : number ) : number => x , 1 ) ; // $ExpectError
82+ zdotc ( 10 , x , 1 , 10 , 1 ) ; // $ExpectError
83+ zdotc ( 10 , x , 1 , '10' , 1 ) ; // $ExpectError
84+ zdotc ( 10 , x , 1 , true , 1 ) ; // $ExpectError
85+ zdotc ( 10 , x , 1 , false , 1 ) ; // $ExpectError
86+ zdotc ( 10 , x , 1 , null , 1 ) ; // $ExpectError
87+ zdotc ( 10 , x , 1 , undefined , 1 ) ; // $ExpectError
88+ zdotc ( 10 , x , 1 , [ ] , 1 ) ; // $ExpectError
89+ zdotc ( 10 , x , 1 , { } , 1 ) ; // $ExpectError
90+ zdotc ( 10 , x , 1 , ( x : number ) : number => x , 1 ) ; // $ExpectError
9291}
9392
9493// The compiler throws an error if the function is provided a fifth argument which is not a number...
9594{
9695 const x = new Complex128Array ( 10 ) ;
9796 const y = new Complex128Array ( 10 ) ;
9897
99- zdotc ( x . length , x , 1 , y , '10' ) ; // $ExpectError
100- zdotc ( x . length , x , 1 , y , true ) ; // $ExpectError
101- zdotc ( x . length , x , 1 , y , false ) ; // $ExpectError
102- zdotc ( x . length , x , 1 , y , null ) ; // $ExpectError
103- zdotc ( x . length , x , 1 , y , undefined ) ; // $ExpectError
104- zdotc ( x . length , x , 1 , y , [ ] ) ; // $ExpectError
105- zdotc ( x . length , x , 1 , y , { } ) ; // $ExpectError
106- zdotc ( x . length , x , 1 , y , ( x : number ) : number => x ) ; // $ExpectError
98+ zdotc ( 10 , x , 1 , y , '10' ) ; // $ExpectError
99+ zdotc ( 10 , x , 1 , y , true ) ; // $ExpectError
100+ zdotc ( 10 , x , 1 , y , false ) ; // $ExpectError
101+ zdotc ( 10 , x , 1 , y , null ) ; // $ExpectError
102+ zdotc ( 10 , x , 1 , y , undefined ) ; // $ExpectError
103+ zdotc ( 10 , x , 1 , y , [ ] ) ; // $ExpectError
104+ zdotc ( 10 , x , 1 , y , { } ) ; // $ExpectError
105+ zdotc ( 10 , x , 1 , y , ( x : number ) : number => x ) ; // $ExpectError
107106}
108107
109108// The compiler throws an error if the function is provided an unsupported number of arguments...
@@ -112,19 +111,19 @@ import zdotc = require( './index' );
112111 const y = new Complex128Array ( 10 ) ;
113112
114113 zdotc ( ) ; // $ExpectError
115- zdotc ( x . length ) ; // $ExpectError
116- zdotc ( x . length , x ) ; // $ExpectError
117- zdotc ( x . length , x , 1 ) ; // $ExpectError
118- zdotc ( x . length , x , 1 , y ) ; // $ExpectError
119- zdotc ( x . length , x , 1 , y , 1 , 10 ) ; // $ExpectError
114+ zdotc ( 10 ) ; // $ExpectError
115+ zdotc ( 10 , x ) ; // $ExpectError
116+ zdotc ( 10 , x , 1 ) ; // $ExpectError
117+ zdotc ( 10 , x , 1 , y ) ; // $ExpectError
118+ zdotc ( 10 , x , 1 , y , 1 , 10 ) ; // $ExpectError
120119}
121120
122121// Attached to main export is an `ndarray` method which returns a Complex128...
123122{
124123 const x = new Complex128Array ( 10 ) ;
125124 const y = new Complex128Array ( 10 ) ;
126125
127- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , 0 ) ; // $ExpectType Complex128
126+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , 0 ) ; // $ExpectType Complex128
128127}
129128
130129// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
@@ -145,92 +144,91 @@ import zdotc = require( './index' );
145144// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Complex128Array...
146145{
147146 const x = new Complex128Array ( 10 ) ;
148- const y = new Complex128Array ( 10 ) ;
149147
150- zdotc . ndarray ( x . length , 10 , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
151- zdotc . ndarray ( x . length , '10' , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
152- zdotc . ndarray ( x . length , true , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
153- zdotc . ndarray ( x . length , false , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
154- zdotc . ndarray ( x . length , null , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
155- zdotc . ndarray ( x . length , undefined , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
156- zdotc . ndarray ( x . length , [ ] , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
157- zdotc . ndarray ( x . length , { } , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
158- zdotc . ndarray ( x . length , ( x : number ) : number => x , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
148+ zdotc . ndarray ( 10 , 10 , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
149+ zdotc . ndarray ( 10 , '10' , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
150+ zdotc . ndarray ( 10 , true , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
151+ zdotc . ndarray ( 10 , false , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
152+ zdotc . ndarray ( 10 , null , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
153+ zdotc . ndarray ( 10 , undefined , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
154+ zdotc . ndarray ( 10 , [ ] , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
155+ zdotc . ndarray ( 10 , { } , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
156+ zdotc . ndarray ( 10 , ( x : number ) : number => x , 1 , 0 , y , 1 , 0 ) ; // $ExpectError
159157}
160158
161159// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
162160{
163161 const x = new Complex128Array ( 10 ) ;
164162 const y = new Complex128Array ( 10 ) ;
165163
166- zdotc . ndarray ( x . length , x , '10' , 0 , y , 1 , 0 ) ; // $ExpectError
167- zdotc . ndarray ( x . length , x , true , 0 , y , 1 , 0 ) ; // $ExpectError
168- zdotc . ndarray ( x . length , x , false , 0 , y , 1 , 0 ) ; // $ExpectError
169- zdotc . ndarray ( x . length , x , null , 0 , y , 1 , 0 ) ; // $ExpectError
170- zdotc . ndarray ( x . length , x , undefined , 0 , y , 1 , 0 ) ; // $ExpectError
171- zdotc . ndarray ( x . length , x , [ ] , 0 , y , 1 , 0 ) ; // $ExpectError
172- zdotc . ndarray ( x . length , x , { } , 0 , y , 1 , 0 ) ; // $ExpectError
173- zdotc . ndarray ( x . length , x , ( x : number ) : number => x , 0 , y , 1 , 0 ) ; // $ExpectError
164+ zdotc . ndarray ( 10 , x , '10' , 0 , y , 1 , 0 ) ; // $ExpectError
165+ zdotc . ndarray ( 10 , x , true , 0 , y , 1 , 0 ) ; // $ExpectError
166+ zdotc . ndarray ( 10 , x , false , 0 , y , 1 , 0 ) ; // $ExpectError
167+ zdotc . ndarray ( 10 , x , null , 0 , y , 1 , 0 ) ; // $ExpectError
168+ zdotc . ndarray ( 10 , x , undefined , 0 , y , 1 , 0 ) ; // $ExpectError
169+ zdotc . ndarray ( 10 , x , [ ] , 0 , y , 1 , 0 ) ; // $ExpectError
170+ zdotc . ndarray ( 10 , x , { } , 0 , y , 1 , 0 ) ; // $ExpectError
171+ zdotc . ndarray ( 10 , x , ( x : number ) : number => x , 0 , y , 1 , 0 ) ; // $ExpectError
174172}
175173
176174// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
177175{
178176 const x = new Complex128Array ( 10 ) ;
179177 const y = new Complex128Array ( 10 ) ;
180178
181- zdotc . ndarray ( x . length , x , 1 , '10' , y , 1 , 0 ) ; // $ExpectError
182- zdotc . ndarray ( x . length , x , 1 , true , y , 1 , 0 ) ; // $ExpectError
183- zdotc . ndarray ( x . length , x , 1 , false , y , 1 , 0 ) ; // $ExpectError
184- zdotc . ndarray ( x . length , x , 1 , null , y , 1 , 0 ) ; // $ExpectError
185- zdotc . ndarray ( x . length , x , 1 , undefined , y , 1 , 0 ) ; // $ExpectError
186- zdotc . ndarray ( x . length , x , 1 , [ ] , y , 1 , 0 ) ; // $ExpectError
187- zdotc . ndarray ( x . length , x , 1 , { } , y , 1 , 0 ) ; // $ExpectError
188- zdotc . ndarray ( x . length , x , 1 , ( x : number ) : number => x , y , 1 , 0 ) ; // $ExpectError
179+ zdotc . ndarray ( 10 , x , 1 , '10' , y , 1 , 0 ) ; // $ExpectError
180+ zdotc . ndarray ( 10 , x , 1 , true , y , 1 , 0 ) ; // $ExpectError
181+ zdotc . ndarray ( 10 , x , 1 , false , y , 1 , 0 ) ; // $ExpectError
182+ zdotc . ndarray ( 10 , x , 1 , null , y , 1 , 0 ) ; // $ExpectError
183+ zdotc . ndarray ( 10 , x , 1 , undefined , y , 1 , 0 ) ; // $ExpectError
184+ zdotc . ndarray ( 10 , x , 1 , [ ] , y , 1 , 0 ) ; // $ExpectError
185+ zdotc . ndarray ( 10 , x , 1 , { } , y , 1 , 0 ) ; // $ExpectError
186+ zdotc . ndarray ( 10 , x , 1 , ( x : number ) : number => x , y , 1 , 0 ) ; // $ExpectError
189187}
190188
191189// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Complex128Array...
192190{
193191 const x = new Complex128Array ( 10 ) ;
194192
195- zdotc . ndarray ( x . length , x , 1 , 0 , 10 , 1 , 0 ) ; // $ExpectError
196- zdotc . ndarray ( x . length , x , 1 , 0 , '10' , 1 , 0 ) ; // $ExpectError
197- zdotc . ndarray ( x . length , x , 1 , 0 , true , 1 , 0 ) ; // $ExpectError
198- zdotc . ndarray ( x . length , x , 1 , 0 , false , 1 , 0 ) ; // $ExpectError
199- zdotc . ndarray ( x . length , x , 1 , 0 , null , 1 , 0 ) ; // $ExpectError
200- zdotc . ndarray ( x . length , x , 1 , 0 , undefined , 1 , 0 ) ; // $ExpectError
201- zdotc . ndarray ( x . length , x , 1 , 0 , [ ] , 1 , 0 ) ; // $ExpectError
202- zdotc . ndarray ( x . length , x , 1 , 0 , { } , 1 , 0 ) ; // $ExpectError
203- zdotc . ndarray ( x . length , x , 1 , 0 , ( x : number ) : number => x , 1 , 0 ) ; // $ExpectError
193+ zdotc . ndarray ( 10 , x , 1 , 0 , 10 , 1 , 0 ) ; // $ExpectError
194+ zdotc . ndarray ( 10 , x , 1 , 0 , '10' , 1 , 0 ) ; // $ExpectError
195+ zdotc . ndarray ( 10 , x , 1 , 0 , true , 1 , 0 ) ; // $ExpectError
196+ zdotc . ndarray ( 10 , x , 1 , 0 , false , 1 , 0 ) ; // $ExpectError
197+ zdotc . ndarray ( 10 , x , 1 , 0 , null , 1 , 0 ) ; // $ExpectError
198+ zdotc . ndarray ( 10 , x , 1 , 0 , undefined , 1 , 0 ) ; // $ExpectError
199+ zdotc . ndarray ( 10 , x , 1 , 0 , [ ] , 1 , 0 ) ; // $ExpectError
200+ zdotc . ndarray ( 10 , x , 1 , 0 , { } , 1 , 0 ) ; // $ExpectError
201+ zdotc . ndarray ( 10 , x , 1 , 0 , ( x : number ) : number => x , 1 , 0 ) ; // $ExpectError
204202}
205203
206204// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
207205{
208206 const x = new Complex128Array ( 10 ) ;
209207 const y = new Complex128Array ( 10 ) ;
210208
211- zdotc . ndarray ( x . length , x , 1 , 0 , y , '10' , 0 ) ; // $ExpectError
212- zdotc . ndarray ( x . length , x , 1 , 0 , y , true , 0 ) ; // $ExpectError
213- zdotc . ndarray ( x . length , x , 1 , 0 , y , false , 0 ) ; // $ExpectError
214- zdotc . ndarray ( x . length , x , 1 , 0 , y , null , 0 ) ; // $ExpectError
215- zdotc . ndarray ( x . length , x , 1 , 0 , y , undefined , 0 ) ; // $ExpectError
216- zdotc . ndarray ( x . length , x , 1 , 0 , y , [ ] , 0 ) ; // $ExpectError
217- zdotc . ndarray ( x . length , x , 1 , 0 , y , { } , 0 ) ; // $ExpectError
218- zdotc . ndarray ( x . length , x , 1 , 0 , y , ( x : number ) : number => x , 0 ) ; // $ExpectError
209+ zdotc . ndarray ( 10 , x , 1 , 0 , y , '10' , 0 ) ; // $ExpectError
210+ zdotc . ndarray ( 10 , x , 1 , 0 , y , true , 0 ) ; // $ExpectError
211+ zdotc . ndarray ( 10 , x , 1 , 0 , y , false , 0 ) ; // $ExpectError
212+ zdotc . ndarray ( 10 , x , 1 , 0 , y , null , 0 ) ; // $ExpectError
213+ zdotc . ndarray ( 10 , x , 1 , 0 , y , undefined , 0 ) ; // $ExpectError
214+ zdotc . ndarray ( 10 , x , 1 , 0 , y , [ ] , 0 ) ; // $ExpectError
215+ zdotc . ndarray ( 10 , x , 1 , 0 , y , { } , 0 ) ; // $ExpectError
216+ zdotc . ndarray ( 10 , x , 1 , 0 , y , ( x : number ) : number => x , 0 ) ; // $ExpectError
219217}
220218
221219// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
222220{
223221 const x = new Complex128Array ( 10 ) ;
224222 const y = new Complex128Array ( 10 ) ;
225223
226- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , '10' ) ; // $ExpectError
227- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , true ) ; // $ExpectError
228- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , false ) ; // $ExpectError
229- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , null ) ; // $ExpectError
230- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , undefined ) ; // $ExpectError
231- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , [ ] ) ; // $ExpectError
232- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , { } ) ; // $ExpectError
233- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , ( x : number ) : number => x ) ; // $ExpectError
224+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , '10' ) ; // $ExpectError
225+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , true ) ; // $ExpectError
226+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , false ) ; // $ExpectError
227+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , null ) ; // $ExpectError
228+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , undefined ) ; // $ExpectError
229+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , [ ] ) ; // $ExpectError
230+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , { } ) ; // $ExpectError
231+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , ( x : number ) : number => x ) ; // $ExpectError
234232}
235233
236234// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
@@ -239,11 +237,11 @@ import zdotc = require( './index' );
239237 const y = new Complex128Array ( 10 ) ;
240238
241239 zdotc . ndarray ( ) ; // $ExpectError
242- zdotc . ndarray ( x . length ) ; // $ExpectError
243- zdotc . ndarray ( x . length , x ) ; // $ExpectError
244- zdotc . ndarray ( x . length , x , 1 ) ; // $ExpectError
245- zdotc . ndarray ( x . length , x , 1 , 0 ) ; // $ExpectError
246- zdotc . ndarray ( x . length , x , 1 , 0 , y ) ; // $ExpectError
247- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 ) ; // $ExpectError
248- zdotc . ndarray ( x . length , x , 1 , 0 , y , 1 , 0 , 10 ) ; // $ExpectError
240+ zdotc . ndarray ( 10 ) ; // $ExpectError
241+ zdotc . ndarray ( 10 , x ) ; // $ExpectError
242+ zdotc . ndarray ( 10 , x , 1 ) ; // $ExpectError
243+ zdotc . ndarray ( 10 , x , 1 , 0 ) ; // $ExpectError
244+ zdotc . ndarray ( 10 , x , 1 , 0 , y ) ; // $ExpectError
245+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 ) ; // $ExpectError
246+ zdotc . ndarray ( 10 , x , 1 , 0 , y , 1 , 0 , 10 ) ; // $ExpectError
249247}
0 commit comments