Skip to content

Commit 00b8d96

Browse files
committed
fix: update native tests to work with int32_t parameters
--- 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 0cd519e commit 00b8d96

File tree

1 file changed

+0
-41
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/hypergeometric/mode/test

1 file changed

+0
-41
lines changed

lib/node_modules/@stdlib/stats/base/dists/hypergeometric/mode/test/test.native.js

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ var tape = require( 'tape' );
2525
var tryRequire = require( '@stdlib/utils/try-require' );
2626
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2727
var abs = require( '@stdlib/math/base/special/abs' );
28-
var PINF = require( '@stdlib/constants/float64/pinf' );
2928
var EPS = require( '@stdlib/constants/float64/eps' );
3029

3130

@@ -50,79 +49,39 @@ tape( 'main export is a function', opts, function test( t ) {
5049
t.end();
5150
});
5251

53-
tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) {
54-
var v = mode( NaN, 10, 4 );
55-
t.equal( isnan( v ), true, 'returns NaN' );
56-
57-
v = mode( 20, NaN, 4 );
58-
t.equal( isnan( v ), true, 'returns NaN' );
59-
60-
v = mode( 20, 10, NaN );
61-
t.equal( isnan( v ), true, 'returns NaN' );
62-
63-
t.end();
64-
});
65-
6652
tape( 'if provided an `N` which is not a nonnegative integer, the function returns `NaN`', opts, function test( t ) {
6753
var v;
6854

69-
v = mode( 10.5, 4, 2 );
70-
t.equal( isnan( v ), true, 'returns NaN' );
71-
7255
v = mode( -2, 4, 2 );
7356
t.equal( isnan( v ), true, 'returns NaN' );
7457

7558
v = mode( -1, 4, 2 );
7659
t.equal( isnan( v ), true, 'returns NaN' );
7760

78-
v = mode( 20.5, 10, 5 );
79-
t.equal( isnan( v ), true, 'returns NaN' );
80-
81-
v = mode( PINF, 10, 5 );
82-
t.equal( isnan( v ), true, 'returns NaN' );
83-
8461
t.end();
8562
});
8663

8764
tape( 'if provided an `K` which is not a nonnegative integer, the function returns `NaN`', opts, function test( t ) {
8865
var y;
8966

90-
y = mode( 20, 3.5, 10 );
91-
t.equal( isnan( y ), true, 'returns NaN' );
92-
9367
y = mode( 20, -2, 10 );
9468
t.equal( isnan( y ), true, 'returns NaN' );
9569

9670
y = mode( 20, -1, 10 );
9771
t.equal( isnan( y ), true, 'returns NaN' );
9872

99-
y = mode( 20, 2.5, 10 );
100-
t.equal( isnan( y ), true, 'returns NaN' );
101-
102-
y = mode( 20, PINF, 10 );
103-
t.equal( isnan( y ), true, 'returns NaN' );
104-
10573
t.end();
10674
});
10775

10876
tape( 'if provided an `n` which is not a nonnegative integer, the function returns `NaN`', opts, function test( t ) {
10977
var y;
11078

111-
y = mode( 40, 20, 3.5 );
112-
t.equal( isnan( y ), true, 'returns NaN' );
113-
11479
y = mode( 40, 20, -2 );
11580
t.equal( isnan( y ), true, 'returns NaN' );
11681

11782
y = mode( 40, 20, -1 );
11883
t.equal( isnan( y ), true, 'returns NaN' );
11984

120-
y = mode( 40, 20, 2.5 );
121-
t.equal( isnan( y ), true, 'returns NaN' );
122-
123-
y = mode( 40, 20, PINF );
124-
t.equal( isnan( y ), true, 'returns NaN' );
125-
12685
t.end();
12786
});
12887

0 commit comments

Comments
 (0)