Skip to content

Commit 58fce90

Browse files
committed
refactor tests/
1 parent 793a9d3 commit 58fce90

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

lib/node_modules/@stdlib/blas/base/snrm2/test/test.ndarray.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2020 The Stdlib Authors.
4+
* Copyright (c) 2023 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var floor = require( '@stdlib/math/base/special/floor' );
2524
var Float32Array = require( '@stdlib/array/float32' );
2625
var snrm2 = require( './../lib/ndarray.js' );
2726

@@ -87,7 +86,7 @@ tape( 'the function supports a `stride` parameter', function test( t ) {
8786
2.0
8887
]);
8988

90-
N = floor( x.length / 2 );
89+
N = 4;
9190
z = snrm2( N, x, 2, 0 );
9291

9392
t.strictEqual( z, 5.0, 'returns expected value' );
@@ -110,7 +109,7 @@ tape( 'the function supports a negative `stride` parameter', function test( t )
110109
2.0
111110
]);
112111

113-
N = floor( x.length / 2 );
112+
N = 4;
114113
z = snrm2( N, x, -2, x.length-2 );
115114

116115
t.strictEqual( z, 5.0, 'returns expected value' );
@@ -132,7 +131,7 @@ tape( 'the function supports an `offset` parameter', function test( t ) {
132131
3.0,
133132
4.0 // 3
134133
]);
135-
N = floor( x.length / 2 );
134+
N = 4;
136135

137136
z = snrm2( N, x, 2, 1 );
138137
t.strictEqual( z, 5.0, 'returns expected value' );

lib/node_modules/@stdlib/blas/base/snrm2/test/test.snrm2.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2020 The Stdlib Authors.
4+
* Copyright (c) 2023 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var floor = require( '@stdlib/math/base/special/floor' );
2524
var Float32Array = require( '@stdlib/array/float32' );
2625
var snrm2 = require( './../lib/snrm2.js' );
2726

@@ -87,7 +86,7 @@ tape( 'the function supports a `stride` parameter', function test( t ) {
8786
2.0
8887
]);
8988

90-
N = floor( x.length / 2 );
89+
N = 4;
9190
z = snrm2( N, x, 2 );
9291

9392
t.strictEqual( z, 5.0, 'returns expected value' );
@@ -128,7 +127,7 @@ tape( 'the function supports view offsets', function test( t ) {
128127
]);
129128

130129
x1 = new Float32Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
131-
N = floor(x1.length / 2);
130+
N = 4;
132131

133132
z = snrm2( N, x1, 2 );
134133
t.strictEqual( z, 5.0, 'returns expected value' );

lib/node_modules/@stdlib/blas/base/snrm2/test/test.snrm2.native.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2020 The Stdlib Authors.
4+
* Copyright (c) 2023 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
25-
var floor = require( '@stdlib/math/base/special/floor' );
2625
var Float32Array = require( '@stdlib/array/float32' );
2726
var tryRequire = require( '@stdlib/utils/try-require' );
2827

@@ -96,7 +95,7 @@ tape( 'the function supports a `stride` parameter', opts, function test( t ) {
9695
2.0
9796
]);
9897

99-
N = floor( x.length / 2 );
98+
N = 4;
10099
z = snrm2( N, x, 2 );
101100

102101
t.strictEqual( z, 5.0, 'returns expected value' );
@@ -137,7 +136,7 @@ tape( 'the function supports view offsets', opts, function test( t ) {
137136
]);
138137

139138
x1 = new Float32Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
140-
N = floor(x1.length / 2);
139+
N = 4;
141140

142141
z = snrm2( N, x1, 2 );
143142
t.strictEqual( z, 5.0, 'returns expected value' );

0 commit comments

Comments
 (0)