Skip to content

Commit 4e97f18

Browse files
committed
chore: update test cases
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 4720453 commit 4e97f18

File tree

2 files changed

+37
-21
lines changed

2 files changed

+37
-21
lines changed

lib/node_modules/@stdlib/blas/base/grot/test/test.main.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ tape( 'the function applies a plane rotation (sx=1, sy=1) (accessors)', function
114114
var xbuf;
115115
var ybuf;
116116
var out;
117+
var yob;
117118
var xe;
118119
var ye;
119120
var N;
@@ -142,10 +143,11 @@ tape( 'the function applies a plane rotation (sx=1, sy=1) (accessors)', function
142143
for ( i = 0; i < N.length; i++ ) {
143144
x = xbuf.slice();
144145
y = ybuf.slice();
145-
out = grot( N[ i ], toAccessorArray( x ), 1, toAccessorArray( y ), 1, 0.8, 0.6 );
146+
yob = toAccessorArray( y );
147+
out = grot( N[ i ], toAccessorArray( x ), 1, yob, 1, 0.8, 0.6 );
146148
isApprox( t, x, xe[ i ], 6.0 );
147149
isApprox( t, y, ye[ i ], 6.0 );
148-
t.strictEqual( out._buffer, y, 'returns expected value' );
150+
t.strictEqual( out, yob, 'returns expected value' );
149151
}
150152
t.end();
151153
});
@@ -194,6 +196,7 @@ tape( 'the function applies a plane rotation (sx=2, sy=-2) (accessors)', functio
194196
var xbuf;
195197
var ybuf;
196198
var out;
199+
var yob;
197200
var xe;
198201
var ye;
199202
var N;
@@ -222,10 +225,11 @@ tape( 'the function applies a plane rotation (sx=2, sy=-2) (accessors)', functio
222225
for ( i = 0; i < N.length; i++ ) {
223226
x = xbuf.slice();
224227
y = ybuf.slice();
225-
out = grot( N[ i ], toAccessorArray( x ), 2, toAccessorArray( y ), -2, 0.8, 0.6 );
228+
yob = toAccessorArray( y );
229+
out = grot( N[ i ], toAccessorArray( x ), 2, yob, -2, 0.8, 0.6 );
226230
isApprox( t, x, xe[ i ], 20.0 );
227231
isApprox( t, y, ye[ i ], 20.0 );
228-
t.strictEqual( out._buffer, y, 'returns expected value' );
232+
t.strictEqual( out, yob, 'returns expected value' );
229233
}
230234
t.end();
231235
});
@@ -274,6 +278,7 @@ tape( 'the function applies a plane rotation (sx=-2, sy=1) (accessors)', functio
274278
var xbuf;
275279
var ybuf;
276280
var out;
281+
var yob;
277282
var xe;
278283
var ye;
279284
var N;
@@ -302,10 +307,11 @@ tape( 'the function applies a plane rotation (sx=-2, sy=1) (accessors)', functio
302307
for ( i = 0; i < N.length; i++ ) {
303308
x = xbuf.slice();
304309
y = ybuf.slice();
305-
out = grot( N[ i ], toAccessorArray( x ), -2, toAccessorArray( y ), 1, 0.8, 0.6 );
310+
yob = toAccessorArray( y );
311+
out = grot( N[ i ], toAccessorArray( x ), -2, yob, 1, 0.8, 0.6 );
306312
isApprox( t, x, xe[ i ], 20.0 );
307313
isApprox( t, y, ye[ i ], 20.0 );
308-
t.strictEqual( out._buffer, y, 'returns expected value' );
314+
t.strictEqual( out, yob, 'returns expected value' );
309315
}
310316
t.end();
311317
});
@@ -354,6 +360,7 @@ tape( 'the function applies a plane rotation (sx=-1, sy=-2) (accessors)', functi
354360
var xbuf;
355361
var ybuf;
356362
var out;
363+
var yob;
357364
var xe;
358365
var ye;
359366
var N;
@@ -382,10 +389,11 @@ tape( 'the function applies a plane rotation (sx=-1, sy=-2) (accessors)', functi
382389
for ( i = 0; i < N.length; i++ ) {
383390
x = xbuf.slice();
384391
y = ybuf.slice();
385-
out = grot( N[ i ], toAccessorArray( x ), -1, toAccessorArray( y ), -2, 0.8, 0.6 );
392+
yob = toAccessorArray( y );
393+
out = grot( N[ i ], toAccessorArray( x ), -1, yob, -2, 0.8, 0.6 );
386394
isApprox( t, x, xe[ i ], 4.0 );
387395
isApprox( t, y, ye[ i ], 4.0 );
388-
t.strictEqual( out._buffer, y, 'returns expected value' );
396+
t.strictEqual( out, yob, 'returns expected value' );
389397
}
390398
t.end();
391399
});

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

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24+
var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
2425
var gcopy = require( '@stdlib/blas/base/gcopy' ).ndarray;
2526
var EPS = require( '@stdlib/constants/float64/eps' );
2627
var abs = require( '@stdlib/math/base/special/abs' );
2728
var grot = require( './../lib/ndarray.js' );
28-
const toAccessorArray = require('@stdlib/array/base/to-accessor-array');
2929

3030

3131
// FUNCTIONS //
@@ -119,6 +119,7 @@ tape( 'the function applies a plane rotation (sx=1, sy=1) (accessors)', function
119119
var xbuf;
120120
var ybuf;
121121
var out;
122+
var yob;
122123
var xe;
123124
var ye;
124125
var ox;
@@ -152,10 +153,11 @@ tape( 'the function applies a plane rotation (sx=1, sy=1) (accessors)', function
152153
for ( i = 0; i < N.length; i++ ) {
153154
x = xbuf.slice();
154155
y = ybuf.slice();
155-
out = grot( N[ i ], toAccessorArray( x ), 1, ox[ i ], toAccessorArray( y ), 1, oy[ i ], 0.8, 0.6 );
156+
yob = toAccessorArray( y );
157+
out = grot( N[ i ], toAccessorArray( x ), 1, ox[ i ], yob, 1, oy[ i ], 0.8, 0.6 );
156158
isApprox( t, x, xe[ i ], 6.0 );
157159
isApprox( t, y, ye[ i ], 6.0 );
158-
t.strictEqual( out._buffer, y, 'returns expected value' );
160+
t.strictEqual( out, yob, 'returns expected value' );
159161
}
160162
t.end();
161163
});
@@ -209,6 +211,7 @@ tape( 'the function applies a plane rotation (sx=2, sy=-2) (accessors)', functio
209211
var xbuf;
210212
var ybuf;
211213
var out;
214+
var yob;
212215
var xe;
213216
var ye;
214217
var ox;
@@ -242,10 +245,11 @@ tape( 'the function applies a plane rotation (sx=2, sy=-2) (accessors)', functio
242245
for ( i = 0; i < N.length; i++ ) {
243246
x = xbuf.slice();
244247
y = ybuf.slice();
245-
out = grot( N[ i ], toAccessorArray( x ), 2, ox[ i ], toAccessorArray( y ), -2, oy[ i ], 0.8, 0.6 );
248+
yob = toAccessorArray( y );
249+
out = grot( N[ i ], toAccessorArray( x ), 2, ox[ i ], yob, -2, oy[ i ], 0.8, 0.6 );
246250
isApprox( t, x, xe[ i ], 20.0 );
247251
isApprox( t, y, ye[ i ], 20.0 );
248-
t.strictEqual( out._buffer, y, 'returns expected value' );
252+
t.strictEqual( out, yob, 'returns expected value' );
249253
}
250254
t.end();
251255
});
@@ -298,6 +302,7 @@ tape( 'the function applies a plane rotation (sx=-2, sy=1) (accessors)', functio
298302
var xbuf;
299303
var ybuf;
300304
var out;
305+
var yob;
301306
var xe;
302307
var ye;
303308
var ox;
@@ -330,10 +335,11 @@ tape( 'the function applies a plane rotation (sx=-2, sy=1) (accessors)', functio
330335
for ( i = 0; i < N.length; i++ ) {
331336
x = xbuf.slice();
332337
y = ybuf.slice();
333-
out = grot( N[ i ], toAccessorArray( x ), -2, ox[ i ], toAccessorArray( y ), 1, oy[ i ], 0.8, 0.6 );
338+
yob = toAccessorArray( y );
339+
out = grot( N[ i ], toAccessorArray( x ), -2, ox[ i ], yob, 1, oy[ i ], 0.8, 0.6 );
334340
isApprox( t, x, xe[ i ], 20.0 );
335341
isApprox( t, y, ye[ i ], 20.0 );
336-
t.strictEqual( out._buffer, y, 'returns expected value' );
342+
t.strictEqual( out, yob, 'returns expected value' );
337343
}
338344
t.end();
339345
});
@@ -387,6 +393,7 @@ tape( 'the function applies a plane rotation (sx=-1, sy=-2) (accessors)', functi
387393
var xbuf;
388394
var ybuf;
389395
var out;
396+
var yob;
390397
var xe;
391398
var ye;
392399
var ox;
@@ -420,10 +427,11 @@ tape( 'the function applies a plane rotation (sx=-1, sy=-2) (accessors)', functi
420427
for ( i = 0; i < N.length; i++ ) {
421428
x = xbuf.slice();
422429
y = ybuf.slice();
423-
out = grot( N[ i ], toAccessorArray( x ), -1, ox[ i ], toAccessorArray( y ), -2, oy[ i ], 0.8, 0.6 );
430+
yob = toAccessorArray( y );
431+
out = grot( N[ i ], toAccessorArray( x ), -1, ox[ i ], yob, -2, oy[ i ], 0.8, 0.6 );
424432
isApprox( t, x, xe[ i ], 4.0 );
425433
isApprox( t, y, ye[ i ], 4.0 );
426-
t.strictEqual( out._buffer, y, 'returns expected value' );
434+
t.strictEqual( out, yob, 'returns expected value' );
427435
}
428436
t.end();
429437
});
@@ -721,10 +729,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function leav
721729
x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
722730
y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];
723731

724-
xe = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]
732+
xe = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];
725733
gcopy( x.length, x, 1, 0, xe, 1, 0 );
726734

727-
ye = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]
735+
ye = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];
728736
gcopy( y.length, y, 1, 0, ye, 1, 0 );
729737

730738
grot( -1, x, 1, 0, y, 1, 0, 0.8, 0.6 );
@@ -747,10 +755,10 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function leav
747755
x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
748756
y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];
749757

750-
xe = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]
758+
xe = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];
751759
gcopy( x.length, x, 1, 0, xe, 1, 0 );
752760

753-
ye = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]
761+
ye = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];
754762
gcopy( y.length, y, 1, 0, ye, 1, 0 );
755763

756764
grot( -1, toAccessorArray( x ), 1, 0, toAccessorArray( y ), 1, 0, 0.8, 0.6 );

0 commit comments

Comments
 (0)