Skip to content

Commit 001aca0

Browse files
committed
test: fix broken tests and add notes
--- 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 01d9619 commit 001aca0

File tree

8 files changed

+51
-15
lines changed

8 files changed

+51
-15
lines changed

lib/node_modules/@stdlib/blas/ext/base/dindex-of/docs/types/index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ interface Routine {
2626
/**
2727
* Returns the first index of a specified search element in a double-precision floating-point strided array.
2828
*
29+
* ## Notes
30+
*
31+
* - If the function is unable to find a search element, the function returns `-1`.
32+
*
2933
* @param N - number of indexed elements
3034
* @param searchElement - search element
3135
* @param x - input array
@@ -45,6 +49,10 @@ interface Routine {
4549
/**
4650
* Returns the first index of a specified search element in a double-precision floating-point strided array using alternative indexing semantics.
4751
*
52+
* ## Notes
53+
*
54+
* - If the function is unable to find a search element, the function returns `-1`.
55+
*
4856
* @param N - number of indexed elements
4957
* @param searchElement - search element
5058
* @param x - input array
@@ -66,6 +74,10 @@ interface Routine {
6674
/**
6775
* Returns the first index of a specified search element in a double-precision floating-point strided array.
6876
*
77+
* ## Notes
78+
*
79+
* - If the function is unable to find a search element, the function returns `-1`.
80+
*
6981
* @param N - number of indexed elements
7082
* @param searchElement - search element
7183
* @param x - input array

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ tape( 'the function returns the first index of an element which equals a provide
4343
actual = dindexOf( x.length, 1.0, x, 1, 0 );
4444
t.strictEqual( actual, 0, 'returns expected value' );
4545

46-
actual = dindexOf( x.length, 2.0, x, 1, 1 );
46+
actual = dindexOf( x.length-1, 2.0, x, 1, 1 );
4747
t.strictEqual( actual, 1, 'returns expected value' );
4848

49-
actual = dindexOf( x.length, 3.0, x, 1, 2 );
49+
actual = dindexOf( x.length-2, 3.0, x, 1, 2 );
5050
t.strictEqual( actual, 2, 'returns expected value' );
5151

52-
actual = dindexOf( x.length, 4.0, x, 1, 2 );
52+
actual = dindexOf( x.length-2, 4.0, x, 1, 2 );
5353
t.strictEqual( actual, -1, 'returns expected value' );
5454

5555
// Negative stride...

lib/node_modules/@stdlib/blas/ext/base/dindex-of/test/test.ndarray.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ tape( 'the function returns the first index of an element which equals a provide
5252
actual = dindexOf( x.length, 1.0, x, 1, 0 );
5353
t.strictEqual( actual, 0, 'returns expected value' );
5454

55-
actual = dindexOf( x.length, 2.0, x, 1, 1 );
55+
actual = dindexOf( x.length-1, 2.0, x, 1, 1 );
5656
t.strictEqual( actual, 1, 'returns expected value' );
5757

58-
actual = dindexOf( x.length, 3.0, x, 1, 2 );
58+
actual = dindexOf( x.length-2, 3.0, x, 1, 2 );
5959
t.strictEqual( actual, 2, 'returns expected value' );
6060

61-
actual = dindexOf( x.length, 4.0, x, 1, 2 );
61+
actual = dindexOf( x.length-2, 4.0, x, 1, 2 );
6262
t.strictEqual( actual, -1, 'returns expected value' );
6363

6464
// Negative stride...

lib/node_modules/@stdlib/blas/ext/base/gindex-of/docs/types/index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ interface Routine {
3434
/**
3535
* Returns the first index of a specified search element in a strided array.
3636
*
37+
* ## Notes
38+
*
39+
* - If the function is unable to find a search element, the function returns `-1`.
40+
*
3741
* @param N - number of indexed elements
3842
* @param searchElement - search element
3943
* @param x - input array
@@ -51,6 +55,10 @@ interface Routine {
5155
/**
5256
* Returns the first index of a specified search element in a strided array using alternative indexing semantics.
5357
*
58+
* ## Notes
59+
*
60+
* - If the function is unable to find a search element, the function returns `-1`.
61+
*
5462
* @param N - number of indexed elements
5563
* @param searchElement - search element
5664
* @param x - input array
@@ -70,6 +78,10 @@ interface Routine {
7078
/**
7179
* Returns the first index of a specified search element in a strided array.
7280
*
81+
* ## Notes
82+
*
83+
* - If the function is unable to find a search element, the function returns `-1`.
84+
*
7385
* @param N - number of indexed elements
7486
* @param searchElement - search element
7587
* @param x - input array

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ tape( 'the function returns the first index of an element which equals a provide
4848
actual = gindexOf( x.length, 1.0, x, 1, 0 );
4949
t.strictEqual( actual, 0, 'returns expected value' );
5050

51-
actual = gindexOf( x.length, 2.0, x, 1, 1 );
51+
actual = gindexOf( x.length-1, 2.0, x, 1, 1 );
5252
t.strictEqual( actual, 1, 'returns expected value' );
5353

54-
actual = gindexOf( x.length, 3.0, x, 1, 2 );
54+
actual = gindexOf( x.length-2, 3.0, x, 1, 2 );
5555
t.strictEqual( actual, 2, 'returns expected value' );
5656

57-
actual = gindexOf( x.length, 4.0, x, 1, 2 );
57+
actual = gindexOf( x.length-2, 4.0, x, 1, 2 );
5858
t.strictEqual( actual, -1, 'returns expected value' );
5959

6060
// Negative stride...

lib/node_modules/@stdlib/blas/ext/base/sindex-of/docs/types/index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ interface Routine {
2626
/**
2727
* Returns the first index of a specified search element in a single-precision floating-point strided array.
2828
*
29+
* ## Notes
30+
*
31+
* - If the function is unable to find a search element, the function returns `-1`.
32+
*
2933
* @param N - number of indexed elements
3034
* @param searchElement - search element
3135
* @param x - input array
@@ -45,6 +49,10 @@ interface Routine {
4549
/**
4650
* Returns the first index of a specified search element in a single-precision floating-point strided array using alternative indexing semantics.
4751
*
52+
* ## Notes
53+
*
54+
* - If the function is unable to find a search element, the function returns `-1`.
55+
*
4856
* @param N - number of indexed elements
4957
* @param searchElement - search element
5058
* @param x - input array
@@ -66,6 +74,10 @@ interface Routine {
6674
/**
6775
* Returns the first index of a specified search element in a single-precision floating-point strided array.
6876
*
77+
* ## Notes
78+
*
79+
* - If the function is unable to find a search element, the function returns `-1`.
80+
*
6981
* @param N - number of indexed elements
7082
* @param searchElement - search element
7183
* @param x - input array

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ tape( 'the function returns the first index of an element which equals a provide
4343
actual = sindexOf( x.length, 1.0, x, 1, 0 );
4444
t.strictEqual( actual, 0, 'returns expected value' );
4545

46-
actual = sindexOf( x.length, 2.0, x, 1, 1 );
46+
actual = sindexOf( x.length-1, 2.0, x, 1, 1 );
4747
t.strictEqual( actual, 1, 'returns expected value' );
4848

49-
actual = sindexOf( x.length, 3.0, x, 1, 2 );
49+
actual = sindexOf( x.length-2, 3.0, x, 1, 2 );
5050
t.strictEqual( actual, 2, 'returns expected value' );
5151

52-
actual = sindexOf( x.length, 4.0, x, 1, 2 );
52+
actual = sindexOf( x.length-2, 4.0, x, 1, 2 );
5353
t.strictEqual( actual, -1, 'returns expected value' );
5454

5555
// Negative stride...

lib/node_modules/@stdlib/blas/ext/base/sindex-of/test/test.ndarray.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ tape( 'the function returns the first index of an element which equals a provide
5252
actual = sindexOf( x.length, 1.0, x, 1, 0 );
5353
t.strictEqual( actual, 0, 'returns expected value' );
5454

55-
actual = sindexOf( x.length, 2.0, x, 1, 1 );
55+
actual = sindexOf( x.length-1, 2.0, x, 1, 1 );
5656
t.strictEqual( actual, 1, 'returns expected value' );
5757

58-
actual = sindexOf( x.length, 3.0, x, 1, 2 );
58+
actual = sindexOf( x.length-2, 3.0, x, 1, 2 );
5959
t.strictEqual( actual, 2, 'returns expected value' );
6060

61-
actual = sindexOf( x.length, 4.0, x, 1, 2 );
61+
actual = sindexOf( x.length-2, 4.0, x, 1, 2 );
6262
t.strictEqual( actual, -1, 'returns expected value' );
6363

6464
// Negative stride...

0 commit comments

Comments
 (0)