Skip to content

Commit c1d2e88

Browse files
authored
test: update test-cases for stride handling in blas/ext/base/gapxsum
PR-URL: #4801 Reviewed-by: Athan Reines <[email protected]>
1 parent 984dc38 commit c1d2e88

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ tape( 'the function supports a negative `stride` parameter', function test( t )
140140
t.end();
141141
});
142142

143-
tape( 'if provided a `stride` parameter equal to `0`, the function returns the first element plus a constant', function test( t ) {
143+
tape( 'if provided a `stride` parameter equal to `0`, the function returns the first element plus a constant repeated N times', function test( t ) {
144144
var x;
145145
var v;
146146

147147
x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ];
148148

149149
v = gapxsum( x.length, 5.0, x, 0 );
150-
t.strictEqual( v, 6.0, 'returns expected value' );
150+
t.strictEqual( v, x.length * (x[0]+5.0), 'returns expected value' );
151151

152152
t.end();
153153
});

lib/node_modules/@stdlib/blas/ext/base/gapxsum/test/test.ndarray.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ tape( 'the function supports a negative `stride` parameter', function test( t )
139139
t.end();
140140
});
141141

142-
tape( 'if provided a `stride` parameter equal to `0`, the function returns the first indexed element plus a constant', function test( t ) {
142+
tape( 'if provided a `stride` parameter equal to `0`, the function returns the first element plus a constant repeated N times', function test( t ) {
143143
var x;
144144
var v;
145145

146146
x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ];
147147

148148
v = gapxsum( x.length, 5.0, x, 0, 0 );
149-
t.strictEqual( v, 6.0, 'returns expected value' );
149+
t.strictEqual( v, x.length * (x[0]+5.0), 'returns expected value' );
150150

151151
t.end();
152152
});

0 commit comments

Comments
 (0)