Skip to content

Commit 3977119

Browse files
committed
test: fix broken test
--- 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: passed - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 6c8898d commit 3977119

1 file changed

Lines changed: 23 additions & 4 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/base/dtype-desc/test

lib/node_modules/@stdlib/ndarray/base/dtype-desc/test/test.js

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,32 @@ tape( 'the function returns the description for a specified data type (string)',
9090

9191
tape( 'the function returns the description for a specified data type (data type instance)', function test( t ) {
9292
var expected;
93+
var dtypes;
9394
var v;
9495
var i;
9596

96-
for ( i = 0; i < DTYPES.length; i++ ) {
97-
v = dtypeDesc( new DataType( DTYPES[ i ] ) );
98-
expected = DESC[ DTYPES[ i ] ] || null;
99-
t.strictEqual( v, expected, 'returns '+expected+' when provided '+DTYPES[i] );
97+
dtypes = [
98+
'float64',
99+
'float32',
100+
'float16',
101+
'int8',
102+
'uint8',
103+
'uint8c',
104+
'int16',
105+
'uint16',
106+
'int32',
107+
'uint32',
108+
'binary',
109+
'generic',
110+
'complex32',
111+
'complex64',
112+
'complex128',
113+
'bool'
114+
];
115+
for ( i = 0; i < dtypes.length; i++ ) {
116+
v = dtypeDesc( new DataType( dtypes[ i ] ) );
117+
expected = DESC[ dtypes[ i ] ] || null;
118+
t.strictEqual( v, expected, 'returns '+expected+' when provided '+dtypes[i] );
100119
}
101120
t.end();
102121
});

0 commit comments

Comments
 (0)