Skip to content

Commit a2b9994

Browse files
authored
test: add tests
Signed-off-by: Athan <[email protected]>
1 parent 3380905 commit a2b9994

File tree

1 file changed

+12
-0
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/glast-index-of/test

1 file changed

+12
-0
lines changed

lib/node_modules/@stdlib/blas/ext/base/glast-index-of/test/test.main.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,18 @@ tape( 'the function returns `-1` if provided `N` parameter is less than or equal
115115
t.end();
116116
});
117117

118+
tape( 'the function returns `-1` if provided `N` parameter is less than or equal to zero (accessors)', function test( t ) {
119+
var actual;
120+
121+
actual = glastIndexOf( 0, 2.0, toAccessorArray( [ 1.0, 2.0, 3.0 ] ), 1 );
122+
t.strictEqual( actual, -1, 'returns expected value' );
123+
124+
actual = glastIndexOf( -1, 2.0, toAccessorArray( [ 1.0, 2.0, 3.0 ] ), 1 );
125+
t.strictEqual( actual, -1, 'returns expected value' );
126+
127+
t.end();
128+
});
129+
118130
tape( 'the function returns `-1` if provided a search element equal to `NaN`', function test( t ) {
119131
var actual;
120132

0 commit comments

Comments
 (0)