Skip to content

Commit 78b9304

Browse files
authored
test: add test case
Signed-off-by: Athan <[email protected]>
1 parent 56db5b6 commit 78b9304

File tree

1 file changed

+21
-0
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/gapxsumkbn2/test

1 file changed

+21
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,27 @@ tape( 'the function supports a `stride` parameter (accessors)', function test( t
163163
t.end();
164164
});
165165

166+
tape( 'the function supports a negative `stride` parameter', function test( t ) {
167+
var x;
168+
var v;
169+
170+
x = [
171+
1.0, // 3
172+
2.0,
173+
2.0, // 2
174+
-7.0,
175+
-2.0, // 1
176+
3.0,
177+
4.0, // 0
178+
2.0
179+
];
180+
181+
v = gapxsumkbn2( 4, 5.0, x, -2 );
182+
183+
t.strictEqual( v, 25.0, 'returns expected value' );
184+
t.end();
185+
});
186+
166187
tape( 'the function supports a negative `stride` parameter (accessors)', function test( t ) {
167188
var x;
168189
var v;

0 commit comments

Comments
 (0)