Skip to content

Commit 714033e

Browse files
committed
fix: test cases
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent dac0781 commit 714033e

File tree

1 file changed

+26
-26
lines changed
  • lib/node_modules/@stdlib/blas/ext/last-index-of/test

1 file changed

+26
-26
lines changed

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ tape( 'the function returns the last index of a specified search element in an n
819819
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
820820

821821
actual = lastIndexOf( x, 2.0 );
822-
expected = [ 1, 1 ];
822+
expected = [ -1, -1 ];
823823

824824
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
825825
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -828,7 +828,7 @@ tape( 'the function returns the last index of a specified search element in an n
828828
t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
829829

830830
actual = lastIndexOf( x, 2.0, 0 );
831-
expected = [ 1, 1 ];
831+
expected = [ -1, -1 ];
832832

833833
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
834834
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -849,7 +849,7 @@ tape( 'the function returns the last index of a specified search element in an n
849849
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
850850

851851
actual = lastIndexOf( x, 2.0 );
852-
expected = [ -1, 1 ];
852+
expected = [ -1, 0 ];
853853

854854
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
855855
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -858,7 +858,7 @@ tape( 'the function returns the last index of a specified search element in an n
858858
t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
859859

860860
actual = lastIndexOf( x, 2.0, 0 );
861-
expected = [ -1, 1 ];
861+
expected = [ -1, 0 ];
862862

863863
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
864864
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -881,7 +881,7 @@ tape( 'the function supports specifying the operation dimension (row-major)', fu
881881
actual = lastIndexOf( x, 2.0, {
882882
'dim': 0
883883
});
884-
expected = [ -1, 1 ];
884+
expected = [ -1, 0 ];
885885

886886
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
887887
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -892,7 +892,7 @@ tape( 'the function supports specifying the operation dimension (row-major)', fu
892892
actual = lastIndexOf( x, 2.0, 0, {
893893
'dim': 0
894894
});
895-
expected = [ -1, 1 ];
895+
expected = [ -1, 0 ];
896896

897897
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
898898
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -906,7 +906,7 @@ tape( 'the function supports specifying the operation dimension (row-major)', fu
906906
actual = lastIndexOf( x, 2.0, {
907907
'dim': 1
908908
});
909-
expected = [ 1, 1 ];
909+
expected = [ -1, -1 ];
910910

911911
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
912912
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -917,7 +917,7 @@ tape( 'the function supports specifying the operation dimension (row-major)', fu
917917
actual = lastIndexOf( x, 2.0, 0, {
918918
'dim': 1
919919
});
920-
expected = [ 1, 1 ];
920+
expected = [ -1, -1 ];
921921

922922
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
923923
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -940,7 +940,7 @@ tape( 'the function supports specifying the operation dimension (column-major)',
940940
actual = lastIndexOf( x, 2.0, {
941941
'dim': 0
942942
});
943-
expected = [ 1, 1 ];
943+
expected = [ -1, -1 ];
944944

945945
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
946946
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -951,7 +951,7 @@ tape( 'the function supports specifying the operation dimension (column-major)',
951951
actual = lastIndexOf( x, 2.0, 0, {
952952
'dim': 0
953953
});
954-
expected = [ 1, 1 ];
954+
expected = [ -1, -1 ];
955955

956956
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
957957
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -965,7 +965,7 @@ tape( 'the function supports specifying the operation dimension (column-major)',
965965
actual = lastIndexOf( x, 2.0, {
966966
'dim': 1
967967
});
968-
expected = [ -1, 1 ];
968+
expected = [ -1, 0 ];
969969

970970
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
971971
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -976,7 +976,7 @@ tape( 'the function supports specifying the operation dimension (column-major)',
976976
actual = lastIndexOf( x, 2.0, 0, {
977977
'dim': 1
978978
});
979-
expected = [ -1, 1 ];
979+
expected = [ -1, 0 ];
980980

981981
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
982982
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -999,7 +999,7 @@ tape( 'the function supports specifying the output array data type', function te
999999
actual = lastIndexOf( x, 2.0, {
10001000
'dtype': 'int32'
10011001
});
1002-
expected = [ 1, 1 ];
1002+
expected = [ -1, -1 ];
10031003

10041004
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
10051005
t.strictEqual( getDType( actual ), 'int32', 'returns expected value' );
@@ -1013,7 +1013,7 @@ tape( 'the function supports specifying the output array data type', function te
10131013
actual = lastIndexOf( x, 2.0, 0, {
10141014
'dtype': 'int32'
10151015
});
1016-
expected = [ -1, 1 ];
1016+
expected = [ -1, 0 ];
10171017

10181018
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
10191019
t.strictEqual( getDType( actual ), 'int32', 'returns expected value' );
@@ -1040,7 +1040,7 @@ tape( 'the function supports providing a from index (scalar)', function test( t
10401040
x = new ndarray( 'generic', xbuf, [ 2, 5 ], [ 5, 1 ], 0, 'row-major' );
10411041

10421042
actual = lastIndexOf( x, 2.0, 2 );
1043-
expected = [ 3, 4 ];
1043+
expected = [ 1, 2 ];
10441044

10451045
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
10461046
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1058,7 +1058,7 @@ tape( 'the function supports providing a from index (scalar)', function test( t
10581058
x = new ndarray( 'generic', xbuf, [ 2, 5 ], [ 1, 2 ], 0, 'column-major' );
10591059

10601060
actual = lastIndexOf( x, 2.0, 2 );
1061-
expected = [ -1, 4 ];
1061+
expected = [ -1, 1 ];
10621062

10631063
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
10641064
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1085,7 +1085,7 @@ tape( 'the function supports providing a from index (scalar, options)', function
10851085
x = new ndarray( 'generic', xbuf, [ 2, 5 ], [ 5, 1 ], 0, 'row-major' );
10861086

10871087
actual = lastIndexOf( x, 2.0, 2, {} );
1088-
expected = [ 3, 4 ];
1088+
expected = [ 1, 2 ];
10891089

10901090
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
10911091
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1103,7 +1103,7 @@ tape( 'the function supports providing a from index (scalar, options)', function
11031103
x = new ndarray( 'generic', xbuf, [ 2, 5 ], [ 1, 2 ], 0, 'column-major' );
11041104

11051105
actual = lastIndexOf( x, 2.0, 2, {} );
1106-
expected = [ -1, 4 ];
1106+
expected = [ -1, 1 ];
11071107

11081108
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
11091109
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1134,7 +1134,7 @@ tape( 'the function supports providing a from index (0d ndarray)', function test
11341134
'dtype': 'generic'
11351135
});
11361136
actual = lastIndexOf( x, 2.0, fromIdx );
1137-
expected = [ 3, 4 ];
1137+
expected = [ 1, 2 ];
11381138

11391139
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
11401140
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1152,7 +1152,7 @@ tape( 'the function supports providing a from index (0d ndarray)', function test
11521152
x = new ndarray( 'generic', xbuf, [ 2, 5 ], [ 1, 2 ], 0, 'column-major' );
11531153

11541154
actual = lastIndexOf( x, 2.0, fromIdx );
1155-
expected = [ -1, 4 ];
1155+
expected = [ -1, 1 ];
11561156

11571157
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
11581158
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1183,7 +1183,7 @@ tape( 'the function supports providing a from index (0d ndarray, options)', func
11831183
'dtype': 'generic'
11841184
});
11851185
actual = lastIndexOf( x, 2.0, fromIdx, {} );
1186-
expected = [ 3, 4 ];
1186+
expected = [ 1, 2 ];
11871187

11881188
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
11891189
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1201,7 +1201,7 @@ tape( 'the function supports providing a from index (0d ndarray, options)', func
12011201
x = new ndarray( 'generic', xbuf, [ 2, 5 ], [ 1, 2 ], 0, 'column-major' );
12021202

12031203
actual = lastIndexOf( x, 2.0, fromIdx, {} );
1204-
expected = [ -1, 4 ];
1204+
expected = [ -1, 1 ];
12051205

12061206
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
12071207
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1233,7 +1233,7 @@ tape( 'the function supports providing a from index (scalar, broadcasted)', func
12331233
actual = lastIndexOf( x, 2.0, 2, {
12341234
'dim': 0
12351235
});
1236-
expected = [ -1, 4 ];
1236+
expected = [ -1, 1 ];
12371237

12381238
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
12391239
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1256,7 +1256,7 @@ tape( 'the function supports providing a from index (scalar, broadcasted)', func
12561256
actual = lastIndexOf( x, 2.0, 2, {
12571257
'dim': 0
12581258
});
1259-
expected = [ 3, 4 ];
1259+
expected = [ 1, 2 ];
12601260

12611261
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
12621262
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1292,7 +1292,7 @@ tape( 'the function supports providing a from index (0d ndarray, broadcasted)',
12921292
actual = lastIndexOf( x, 2.0, fromIdx, {
12931293
'dim': 0
12941294
});
1295-
expected = [ -1, 4 ];
1295+
expected = [ -1, 1 ];
12961296

12971297
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
12981298
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1315,7 +1315,7 @@ tape( 'the function supports providing a from index (0d ndarray, broadcasted)',
13151315
actual = lastIndexOf( x, 2.0, fromIdx, {
13161316
'dim': 0
13171317
});
1318-
expected = [ 3, 4 ];
1318+
expected = [ 1, 2 ];
13191319

13201320
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
13211321
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );

0 commit comments

Comments
 (0)