Skip to content

Commit 45329d5

Browse files
committed
test: fix ndarray buffers
--- 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 6a70bd1 commit 45329d5

File tree

1 file changed

+6
-3
lines changed
  • lib/node_modules/@stdlib/blas/ext/to-sortedhp/test

1 file changed

+6
-3
lines changed

lib/node_modules/@stdlib/blas/ext/to-sortedhp/test/test.main.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
var tape = require( 'tape' );
2424
var isEqualDataType = require( '@stdlib/ndarray/base/assert/is-equal-data-type' );
2525
var isSameArray = require( '@stdlib/assert/is-same-array' );
26+
var Float64Array = require( '@stdlib/array/float64' );
27+
var Float32Array = require( '@stdlib/array/float32' );
28+
var Int8Array = require( '@stdlib/array/int8' );
2629
var resolveStr = require( '@stdlib/ndarray/base/dtype-resolve-str' );
2730
var ndarray = require( '@stdlib/ndarray/ctor' );
2831
var zeros = require( '@stdlib/ndarray/zeros' );
@@ -1710,7 +1713,7 @@ tape( 'the function supports specifying an output data type', function test( t )
17101713
var xbuf;
17111714
var x;
17121715

1713-
xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
1716+
xbuf = new Float32Array( [ -1.0, 2.0, -3.0, 4.0 ] );
17141717
x = new ndarray( 'float32', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
17151718

17161719
actual = toSortedhp( x, {
@@ -1733,7 +1736,7 @@ tape( 'the function supports specifying an output data type (sortOrder=scalar)',
17331736
var xbuf;
17341737
var x;
17351738

1736-
xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
1739+
xbuf = new Float64Array( [ -1.0, 2.0, -3.0, 4.0 ] );
17371740
x = new ndarray( 'float64', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
17381741

17391742
actual = toSortedhp( x, 1.0, {
@@ -1756,7 +1759,7 @@ tape( 'the function supports specifying an output data type (sortOrder=string)',
17561759
var xbuf;
17571760
var x;
17581761

1759-
xbuf = [ -1, 2, -3, 4 ];
1762+
xbuf = new Int8Array( [ -1, 2, -3, 4 ] );
17601763
x = new ndarray( 'int8', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
17611764

17621765
actual = toSortedhp( x, 'desc', {

0 commit comments

Comments
 (0)