diff --git a/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/test/test.dnansumkbn2.native.js b/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/test/test.dnansumkbn2.native.js index 3ac27f39c027..bb3f837491cc 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/test/test.dnansumkbn2.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/test/test.dnansumkbn2.native.js @@ -47,6 +47,17 @@ tape( 'the function has an arity of 3', opts, function test( t ) { t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', opts, function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, 1.0, 2.0, 3.0, 4.0 ] ); + + v = dnansumkbn2( x.length, x, 0 ); + t.strictEqual( v, 0.0, 'returns expected Value' ); + t.end(); +}); + tape( 'the functions throws an error if provided a first argument which is not a number', opts, function test( t ) { var values; var i; diff --git a/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/test/test.ndarray.native.js index 4d6f82d79dea..c9c3c6fb45f0 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/test/test.ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/test/test.ndarray.native.js @@ -47,6 +47,17 @@ tape( 'the function has an arity of 4', opts, function test( t ) { t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', opts, function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, 1.0, 2.0, 3.0, 4.0 ] ); + + v = dnansumkbn2( x.length, x, 0 ); + t.strictEqual( v, 0.0, 'returns expected Value' ); + t.end(); +}); + tape( 'the function calculates the sum of strided array elements (ignoring NaN values)', opts, function test( t ) { var x; var v;