Skip to content

test: update the test of ndarray/base/* #2505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions lib/node_modules/@stdlib/ndarray/base/char2dtype/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ var out = char2dtype();
var dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );
var char2dtype = require( '@stdlib/ndarray/base/char2dtype' );

var chars;
var out;
var i;

chars = [
var chars = [
dtypeChar( 'float64' ),
dtypeChar( 'float32' ),
dtypeChar( 'int8' ),
Expand All @@ -109,9 +105,9 @@ chars = [
'('
];

var i;
for ( i = 0; i < chars.length; i++ ) {
out = char2dtype( chars[ i ] );
console.log( '%s => %s', chars[ i ], out );
console.log( '%s => %s', chars[ i ], char2dtype( chars[ i ] ) );
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
var dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );
var char2dtype = require( './../lib' );

var chars;
var out;
var i;

chars = [
var chars = [
dtypeChar( 'float64' ),
dtypeChar( 'float32' ),
dtypeChar( 'int8' ),
Expand All @@ -40,7 +36,7 @@ chars = [
'('
];

var i;
for ( i = 0; i < chars.length; i++ ) {
out = char2dtype( chars[ i ] );
console.log( '%s => %s', chars[ i ], out );
console.log( '%s => %s', chars[ i ], char2dtype( chars[ i ] ) );
}
5 changes: 3 additions & 2 deletions lib/node_modules/@stdlib/ndarray/base/char2dtype/test/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2021 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -61,7 +61,8 @@ tape( 'the function returns the data type string associated with a provided sing
'binary',
'generic',
'complex64',
'complex128'
'complex128',
'bool'
];
for ( i = 0; i < expected.length; i++ ) {
ch = dtypeChar( expected[ i ] );
Expand Down
10 changes: 3 additions & 7 deletions lib/node_modules/@stdlib/ndarray/base/dtype-char/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ var obj = dtypeChar();
```javascript
var dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );

var dtypes;
var ch;
var i;

dtypes = [
var dtypes = [
'float64',
'float32',
'int8',
Expand All @@ -108,9 +104,9 @@ dtypes = [
'foobar'
];

var i;
for ( i = 0; i < dtypes.length; i++ ) {
ch = dtypeChar( dtypes[ i ] );
console.log( '%s => %s', dtypes[ i ], ch );
console.log( '%s => %s', dtypes[ i ], dtypeChar( dtypes[ i ] ) );
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@

var dtypeChar = require( './../lib' );

var dtypes;
var ch;
var i;

dtypes = [
var dtypes = [
'float64',
'float32',
'int8',
Expand All @@ -39,7 +35,7 @@ dtypes = [
'foobar'
];

var i;
for ( i = 0; i < dtypes.length; i++ ) {
ch = dtypeChar( dtypes[ i ] );
console.log( '%s => %s', dtypes[ i ], ch );
console.log( '%s => %s', dtypes[ i ], dtypeChar( dtypes[ i ] ) );
}
11 changes: 7 additions & 4 deletions lib/node_modules/@stdlib/ndarray/base/dtype-char/test/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,7 +41,8 @@ var DTYPES = [
'binary',
'generic',
'complex64',
'complex128'
'complex128',
'bool'
];


Expand Down Expand Up @@ -74,7 +75,8 @@ tape( 'the function returns an object mapping data type strings to single letter
'r',
'o',
'c',
'z'
'z',
'x'
];

obj = dtypeChar();
Expand Down Expand Up @@ -105,7 +107,8 @@ tape( 'the function returns the single letter character abbreviation for an unde
'r',
'o',
'c',
'z'
'z',
'x'
];
for ( i = 0; i < DTYPES.length; i++ ) {
ch = dtypeChar( DTYPES[ i ] );
Expand Down
10 changes: 3 additions & 7 deletions lib/node_modules/@stdlib/ndarray/base/dtype-desc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ var obj = dtypeDesc();
```javascript
var dtypeDesc = require( '@stdlib/ndarray/base/dtype-desc' );

var dtypes;
var desc;
var i;

dtypes = [
var dtypes = [
'float64',
'float32',
'int8',
Expand All @@ -108,9 +104,9 @@ dtypes = [
'foobar'
];

var i;
for ( i = 0; i < dtypes.length; i++ ) {
desc = dtypeDesc( dtypes[ i ] );
console.log( '%s: %s', dtypes[ i ], desc );
console.log( '%s: %s', dtypes[ i ], dtypeDesc( dtypes[ i ] ) );
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@

var dtypeDesc = require( './../lib' );

var dtypes;
var desc;
var i;

dtypes = [
var dtypes = [
'float64',
'float32',
'int8',
Expand All @@ -39,7 +35,7 @@ dtypes = [
'foobar'
];

var i;
for ( i = 0; i < dtypes.length; i++ ) {
desc = dtypeDesc( dtypes[ i ] );
console.log( '%s: %s', dtypes[ i ], desc );
console.log( '%s: %s', dtypes[ i ], dtypeDesc( dtypes[ i ] ) );
}
5 changes: 3 additions & 2 deletions lib/node_modules/@stdlib/ndarray/base/dtype-desc/test/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2021 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,7 +42,8 @@ var DTYPES = [
'binary',
'generic',
'complex64',
'complex128'
'complex128',
'bool'
];
var DESC = table();

Expand Down
10 changes: 3 additions & 7 deletions lib/node_modules/@stdlib/ndarray/base/dtype2c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@ var out = dtype2c( 'foobar' );
```javascript
var dtype2c = require( '@stdlib/ndarray/base/dtype2c' );

var dtypes;
var out;
var i;

dtypes = [
var dtypes = [
'float64',
'float32',
'int8',
Expand All @@ -101,9 +97,9 @@ dtypes = [
'foobar'
];

var i;
for ( i = 0; i < dtypes.length; i++ ) {
out = dtype2c( dtypes[ i ] );
console.log( '%s => %s', dtypes[ i ], out );
console.log( '%s => %s', dtypes[ i ], dtype2c( dtypes[ i ] ) );
}
```

Expand Down
10 changes: 3 additions & 7 deletions lib/node_modules/@stdlib/ndarray/base/dtype2c/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@

var dtype2c = require( './../lib' );

var dtypes;
var out;
var i;

dtypes = [
var dtypes = [
'float64',
'float32',
'int8',
Expand All @@ -39,7 +35,7 @@ dtypes = [
'foobar'
];

var i;
for ( i = 0; i < dtypes.length; i++ ) {
out = dtype2c( dtypes[ i ] );
console.log( '%s => %s', dtypes[ i ], out );
console.log( '%s => %s', dtypes[ i ], dtype2c( dtypes[ i ] ) );
}
8 changes: 5 additions & 3 deletions lib/node_modules/@stdlib/ndarray/base/dtype2c/test/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2021 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,7 +53,8 @@ tape( 'the function returns the C data type associated with a provided data type
'binary',
'generic',
'complex64',
'complex128'
'complex128',
'bool'
];

expected = [
Expand All @@ -71,7 +72,8 @@ tape( 'the function returns the C data type associated with a provided data type
null,
null,
'stdlib_complex64_t',
'stdlib_complex128_t'
'stdlib_complex128_t',
'bool'
];
for ( i = 0; i < values.length; i++ ) {
out = dtype2c( values[ i ] );
Expand Down
Loading