Skip to content

Commit d917005

Browse files
committed
imports moved to the top
1 parent 5debc39 commit d917005

File tree

1 file changed

+15
-14
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/ndarray/drev/docs/types

1 file changed

+15
-14
lines changed

lib/node_modules/@stdlib/blas/ext/base/ndarray/drev/docs/types/test.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,42 @@
1616
* limitations under the License.
1717
*/
1818

19+
/* eslint-disable space-in-parens */
20+
21+
import zeros = require( '@stdlib/ndarray/zeros' );
1922
import drev = require( './index' );
2023

2124

2225
// TESTS //
2326

2427
// The function returns an ndarray...
2528
{
26-
const Float64Array = require( '@stdlib/array/float64' );
27-
const ndarray = require( '@stdlib/ndarray/base/ctor' );
28-
29-
const xbuf = new Float64Array( [ 1.0, 2.0, 3.0 ] );
30-
const x = new ndarray( 'float64', xbuf, [ 3 ], [ 1 ], 0, 'row-major' );
29+
const x = zeros( [ 3 ], {
30+
'dtype': 'float64'
31+
});
3132

3233
drev( x ); // $ExpectType float64ndarray
3334
}
3435

35-
// The compiler throws an error if the function is provided a first argument which is not an array-like object containing an ndarray...
36+
// The compiler throws an error if the function is provided a first argument which is not an ndarray...
3637
{
37-
drev( 123 ); // $ExpectError
38+
drev( '10' ); // $ExpectError
39+
drev( 10 ); // $ExpectError
3840
drev( true ); // $ExpectError
3941
drev( false ); // $ExpectError
4042
drev( null ); // $ExpectError
4143
drev( undefined ); // $ExpectError
44+
drev( [] ); // $ExpectError
4245
drev( {} ); // $ExpectError
43-
drev( [ 123 ] ); // $ExpectError
46+
drev( ( x: number ): number => x ); // $ExpectError
4447
}
4548

4649
// The compiler throws an error if the function is provided an unsupported number of arguments...
4750
{
48-
const Float64Array = require( '@stdlib/array/float64' );
49-
const ndarray = require( '@stdlib/ndarray/base/ctor' );
50-
51-
const xbuf = new Float64Array( [ 1.0, 2.0, 3.0 ] );
52-
const x = new ndarray( 'float64', xbuf, [ 3 ], [ 1 ], 0, 'row-major' );
51+
const x = zeros( [ 3 ], {
52+
'dtype': 'float64'
53+
});
5354

5455
drev(); // $ExpectError
55-
drev( x, 123 ); // $ExpectError
56+
drev( x, {} ); // $ExpectError
5657
}

0 commit comments

Comments
 (0)