Skip to content

Commit 238e44f

Browse files
committed
test: clean-up
1 parent bd36d63 commit 238e44f

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

lib/node_modules/@stdlib/blas/ext/base/dnanasumors/test/test.dnanasumors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ tape( 'the function calculates the sum of absolute values (ignoring NaN values)'
7777
t.end();
7878
});
7979

80-
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', function test( t ) {
80+
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0`', function test( t ) {
8181
var x;
8282
var v;
8383

@@ -92,7 +92,7 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu
9292
t.end();
9393
});
9494

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

lib/node_modules/@stdlib/blas/ext/base/dnanasumors/test/test.dnanasumors.native.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,6 @@ tape( 'the function has an arity of 3', opts, function test( t ) {
4747
t.end();
4848
});
4949

50-
tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', opts, function test( t ) {
51-
var x;
52-
var v;
53-
54-
x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] );
55-
56-
v = dnanasumors( x.length, x, 0, 0 );
57-
t.strictEqual( v, 0.0, 'returns expected value' );
58-
59-
t.end();
60-
});
61-
6250
tape( 'the functions throws an error if provided a first argument which is not a number', opts, function test( t ) {
6351
var values;
6452
var i;
@@ -180,7 +168,7 @@ tape( 'the function calculates the sum of absolute values (ignoring NaN values)'
180168
t.end();
181169
});
182170

183-
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', opts, function test( t ) {
171+
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0`', opts, function test( t ) {
184172
var x;
185173
var v;
186174

@@ -195,6 +183,18 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu
195183
t.end();
196184
});
197185

186+
tape( 'if provided a `stride` parameter equal to `0` and the first element is `NaN`, the function returns `0`', opts, function test( t ) {
187+
var x;
188+
var v;
189+
190+
x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] );
191+
192+
v = dnanasumors( x.length, x, 0, 0 );
193+
t.strictEqual( v, 0.0, 'returns expected value' );
194+
195+
t.end();
196+
});
197+
198198
tape( 'if provided an `N` parameter equal to `1`, the function returns the first element', opts, function test( t ) {
199199
var x;
200200
var v;

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,28 +77,28 @@ tape( 'the function calculates the sum of absolute values (ignoring NaN values)'
7777
t.end();
7878
});
7979

80-
tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', function test( t ) {
80+
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0`', function test( t ) {
8181
var x;
8282
var v;
8383

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

86-
v = dnanasumors( x.length, x, 0, 0 );
86+
v = dnanasumors( 0, x, 1, 0 );
87+
t.strictEqual( v, 0.0, 'returns expected value' );
88+
89+
v = dnanasumors( -1, x, 1, 0 );
8790
t.strictEqual( v, 0.0, 'returns expected value' );
8891

8992
t.end();
9093
});
9194

92-
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', function test( t ) {
95+
tape( 'if provided a `stride` parameter equal to `0` and the first indexed element is `NaN`, the function returns `0`', function test( t ) {
9396
var x;
9497
var v;
9598

96-
x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
97-
98-
v = dnanasumors( 0, x, 1, 0 );
99-
t.strictEqual( v, 0.0, 'returns expected value' );
99+
x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] );
100100

101-
v = dnanasumors( -1, x, 1, 0 );
101+
v = dnanasumors( x.length, x, 0, 0 );
102102
t.strictEqual( v, 0.0, 'returns expected value' );
103103

104104
t.end();

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ tape( 'the function calculates the sum of absolute values (ignoring NaN values)'
8686
t.end();
8787
});
8888

89-
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', opts, function test( t ) {
89+
tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0`', opts, function test( t ) {
9090
var x;
9191
var v;
9292

@@ -101,26 +101,26 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu
101101
t.end();
102102
});
103103

104-
tape( 'if provided an `N` parameter equal to `1`, the function returns the first indexed element', opts, function test( t ) {
104+
tape( 'if provided a `stride` parameter equal to `0` and the first indexed element is `NaN`, the function returns `0`', opts, function test( t ) {
105105
var x;
106106
var v;
107107

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

110-
v = dnanasumors( 1, x, 1, 0 );
111-
t.strictEqual( v, 1.0, 'returns expected value' );
110+
v = dnanasumors( x.length, x, 0, 0 );
111+
t.strictEqual( v, 0.0, 'returns expected value' );
112112

113113
t.end();
114114
});
115115

116-
tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', opts, function test( t ) {
116+
tape( 'if provided an `N` parameter equal to `1`, the function returns the first indexed element', opts, function test( t ) {
117117
var x;
118118
var v;
119119

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

122-
v = dnanasumors( x.length, x, 0, 0 );
123-
t.strictEqual( v, 0.0, 'returns expected value' );
122+
v = dnanasumors( 1, x, 1, 0 );
123+
t.strictEqual( v, 1.0, 'returns expected value' );
124124

125125
t.end();
126126
});

0 commit comments

Comments
 (0)