Skip to content

Commit 27dfeaa

Browse files
authored
Discard changes to lib/node_modules/@stdlib/blas/ext/base/ndarray/glast-index-of/test/test.js
1 parent 5ab6214 commit 27dfeaa

File tree

1 file changed

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

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ tape( 'the function returns the last index of an element which equals a provided
6363
searchElement = scalar2ndarray( 1.0, {
6464
'dtype': 'generic'
6565
});
66-
fromIndex = scalar2ndarray( 5, {
66+
fromIndex = scalar2ndarray( 0, {
6767
'dtype': 'generic'
6868
});
6969
actual = glastIndexOf( [ x, searchElement, fromIndex ] );
@@ -72,7 +72,7 @@ tape( 'the function returns the last index of an element which equals a provided
7272
searchElement = scalar2ndarray( 2.0, {
7373
'dtype': 'generic'
7474
});
75-
fromIndex = scalar2ndarray( 5, {
75+
fromIndex = scalar2ndarray( 0, {
7676
'dtype': 'generic'
7777
});
7878
actual = glastIndexOf( [ x, searchElement, fromIndex ] );
@@ -113,7 +113,7 @@ tape( 'the function returns the last index of an element which equals a provided
113113
'dtype': 'generic'
114114
});
115115
actual = glastIndexOf( [ x, searchElement, fromIndex ] );
116-
t.strictEqual( actual, 4, 'returns expected value' );
116+
t.strictEqual( actual, 5, 'returns expected value' );
117117

118118
searchElement = scalar2ndarray( 2.0, {
119119
'dtype': 'generic'
@@ -131,12 +131,12 @@ tape( 'the function returns the last index of an element which equals a provided
131131
'dtype': 'generic'
132132
});
133133
actual = glastIndexOf( [ x, searchElement, fromIndex ] );
134-
t.strictEqual( actual, -1, 'returns expected value' );
134+
t.strictEqual( actual, 3, 'returns expected value' );
135135

136136
t.end();
137137
});
138138

139-
tape( 'the function clamps the provided starting search index if it is greater than or equal to number of elements in the input ndarray', function test( t ) {
139+
tape( 'the function returns `-1` if provided a starting search index which is greater than or equal to number of elements in the input ndarray', function test( t ) {
140140
var searchElement;
141141
var fromIndex;
142142
var actual;
@@ -151,7 +151,7 @@ tape( 'the function clamps the provided starting search index if it is greater t
151151
});
152152

153153
actual = glastIndexOf( [ x, searchElement, fromIndex ] );
154-
t.strictEqual( actual, 3, 'returns expected value' );
154+
t.strictEqual( actual, -1, 'returns expected value' );
155155

156156
t.end();
157157
});

0 commit comments

Comments
 (0)