Skip to content

Commit fbcae92

Browse files
authored
Discard changes to lib/node_modules/@stdlib/blas/ext/base/ndarray/slast-index-of/test/test.js
1 parent 28ed5ca commit fbcae92

File tree

1 file changed

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

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ tape( 'the function returns the last index of an element which equals a provided
6464
searchElement = scalar2ndarray( 1.0, {
6565
'dtype': 'float32'
6666
});
67-
fromIndex = scalar2ndarray( 5, {
67+
fromIndex = scalar2ndarray( 0, {
6868
'dtype': 'generic'
6969
});
7070
actual = slastIndexOf( [ x, searchElement, fromIndex ] );
@@ -73,7 +73,7 @@ tape( 'the function returns the last index of an element which equals a provided
7373
searchElement = scalar2ndarray( 2.0, {
7474
'dtype': 'float32'
7575
});
76-
fromIndex = scalar2ndarray( 5, {
76+
fromIndex = scalar2ndarray( 0, {
7777
'dtype': 'generic'
7878
});
7979
actual = slastIndexOf( [ x, searchElement, fromIndex ] );
@@ -114,7 +114,7 @@ tape( 'the function returns the last index of an element which equals a provided
114114
'dtype': 'generic'
115115
});
116116
actual = slastIndexOf( [ x, searchElement, fromIndex ] );
117-
t.strictEqual( actual, 4, 'returns expected value' );
117+
t.strictEqual( actual, 5, 'returns expected value' );
118118

119119
searchElement = scalar2ndarray( 2.0, {
120120
'dtype': 'float32'
@@ -132,12 +132,12 @@ tape( 'the function returns the last index of an element which equals a provided
132132
'dtype': 'generic'
133133
});
134134
actual = slastIndexOf( [ x, searchElement, fromIndex ] );
135-
t.strictEqual( actual, -1, 'returns expected value' );
135+
t.strictEqual( actual, 3, 'returns expected value' );
136136

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

140-
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 ) {
140+
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 ) {
141141
var searchElement;
142142
var fromIndex;
143143
var actual;
@@ -152,7 +152,7 @@ tape( 'the function clamps the provided starting search index if it is greater t
152152
});
153153

154154
actual = slastIndexOf( [ x, searchElement, fromIndex ] );
155-
t.strictEqual( actual, 3, 'returns expected value' );
155+
t.strictEqual( actual, -1, 'returns expected value' );
156156

157157
t.end();
158158
});

0 commit comments

Comments
 (0)