Skip to content

Commit bf43f4c

Browse files
refactor: update type checking in benchmark
1 parent a8dad0e commit bf43f4c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.reverse.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var isTypedArray= require( '@stdlib/assert/is-typed-array' );
2524
var factory = require( './../lib' );
2625
var pkg = require( './../package.json' ).name;
2726

@@ -48,7 +47,7 @@ bench( pkg+':reverse', function benchmark( b ) {
4847
}
4948
}
5049
b.toc();
51-
if ( !isTypedArray( out ) ) {
50+
if ( !( out instanceof Float64ArrayFE ) ) {
5251
b.fail( 'should return a typed array' );
5352
}
5453
b.pass( 'benchmark finished' );

lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.reverse.length.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
var bench = require( '@stdlib/bench' );
2424
var pow = require( '@stdlib/math/base/special/pow' );
2525
var zeroTo = require( '@stdlib/array/zero-to' );
26-
var isTypedArray = require( '@stdlib/assert/is-typed-array' );
2726
var factory = require( './../lib' );
2827
var pkg = require( './../package.json' ).name;
2928

@@ -58,13 +57,13 @@ function createBenchmark( len ) {
5857

5958
b.tic();
6059
for ( i = 0; i < b.iterations; i++ ) {
61-
out = arr.reverse( );
60+
out = arr.reverse();
6261
if ( typeof out !== 'object' ) {
6362
b.fail( 'should return an object' );
6463
}
6564
}
6665
b.toc();
67-
if ( !isTypedArray( out ) ) {
66+
if ( !( out instanceof Float64ArrayFE ) ) {
6867
b.fail( 'should return a typed array' );
6968
}
7069
b.pass( 'benchmark finished' );

0 commit comments

Comments
 (0)