Skip to content

Commit 5e934c2

Browse files
authored
test: add test case
Signed-off-by: Athan <[email protected]>
1 parent 89764b7 commit 5e934c2

File tree

1 file changed

+12
-0
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/gapxsumors/test

1 file changed

+12
-0
lines changed

lib/node_modules/@stdlib/blas/ext/base/gapxsumors/test/test.main.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the f
217217
t.end();
218218
});
219219

220+
tape( 'if provided a `stride` parameter equal to `0`, the function returns the first element plus a constant repeated N times (accessors)', function test( t ) {
221+
var x;
222+
var v;
223+
224+
x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ];
225+
226+
v = gapxsumors( x.length, 5.0, toAccessorArray( x ), 0 );
227+
t.strictEqual( v, x.length * (x[0]+5.0), 'returns expected value' );
228+
229+
t.end();
230+
});
231+
220232
tape( 'the function supports view offsets', function test( t ) {
221233
var x0;
222234
var x1;

0 commit comments

Comments
 (0)