Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,18 @@
t.end();
});

tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', function test( t ) {

Check failure on line 165 in lib/node_modules/@stdlib/blas/ext/base/dnanasum/test/test.dnanasum.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Trailing spaces not allowed
var x;

Check failure on line 166 in lib/node_modules/@stdlib/blas/ext/base/dnanasum/test/test.dnanasum.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Trailing spaces not allowed
var v;

x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] );

Check failure on line 169 in lib/node_modules/@stdlib/blas/ext/base/dnanasum/test/test.dnanasum.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Trailing spaces not allowed

Check failure on line 170 in lib/node_modules/@stdlib/blas/ext/base/dnanasum/test/test.dnanasum.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Trailing spaces not allowed
v = dnanasum( x.length, x, 0 );

Check failure on line 171 in lib/node_modules/@stdlib/blas/ext/base/dnanasum/test/test.dnanasum.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Trailing spaces not allowed
t.strictEqual( v, 0.0, 'returns expected value' );

Check failure on line 172 in lib/node_modules/@stdlib/blas/ext/base/dnanasum/test/test.dnanasum.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Trailing spaces not allowed

Check failure on line 173 in lib/node_modules/@stdlib/blas/ext/base/dnanasum/test/test.dnanasum.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Trailing spaces not allowed
t.end();

Check failure on line 174 in lib/node_modules/@stdlib/blas/ext/base/dnanasum/test/test.dnanasum.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Trailing spaces not allowed
});

tape( 'the function supports view offsets', function test( t ) {
var x0;
var x1;
Expand All @@ -187,4 +199,4 @@
t.strictEqual( v, 9.0, 'returns expected value' );

t.end();
});
});

Check failure on line 202 in lib/node_modules/@stdlib/blas/ext/base/dnanasum/test/test.dnanasum.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Newline required at end of file but not found
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s
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, -2.0, -4.0, 5.0, 3.0 ] );

v = dnanasum( x.length, x, 0 );
t.strictEqual( v, 0.0, 'returns expected value' );

t.end();
});

tape( 'the function supports view offsets', opts, function test( t ) {
var x0;
var x1;
Expand All @@ -278,4 +290,4 @@ tape( 'the function supports view offsets', opts, function test( t ) {
t.strictEqual( v, 9.0, 'returns expected value' );

t.end();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s
t.end();
});

tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', function test( t ) {
var x;
var v;

x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] );

v = dnanasum( x.length, x, 0, 0 );
t.strictEqual( v, 0.0, 'returns expected value' );

t.end();
});

tape( 'the function supports an `offset` parameter', function test( t ) {
var x;
var v;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s
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, -2.0, -4.0, 5.0, 3.0 ] );

v = dnanasum( x.length, x, 0, 0 );
t.strictEqual( v, 0.0, 'returns expected value' );

t.end();
});

tape( 'the function supports an `offset` parameter', opts, function test( t ) {
var x;
var v;
Expand Down
Loading