Skip to content

Commit 47fe9a7

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

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

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

118+
tape( 'the function returns `-1` if provided an `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, 0 );
122+
t.strictEqual( actual, -1, 'returns expected value' );
123+
124+
actual = glastIndexOf( -1, 2.0, toAccessorArray( [ 1.0, 2.0, 3.0 ] ), 1, 0 );
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

@@ -124,7 +136,7 @@ tape( 'the function returns `-1` if provided a search element equal to `NaN`', f
124136
t.end();
125137
});
126138

127-
tape( 'the function returns `-1` if provided a search element equal to `NaN`', function test( t ) {
139+
tape( 'the function returns `-1` if provided a search element equal to `NaN` (accessors)', function test( t ) {
128140
var actual;
129141

130142
actual = glastIndexOf( 1, NaN, toAccessorArray( [ NaN ] ), 1, 0 );

0 commit comments

Comments
 (0)