Skip to content

Commit aaac825

Browse files
committed
bench: fix assertions
--- 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: na - task: lint_javascript_benchmarks status: passed - 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 6544e40 commit aaac825

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/ctor/benchmark

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/ctor/benchmark/benchmark.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ bench( pkg+'::set:a', function benchmark( bm ) {
104104
bm.tic();
105105
for ( i = 0; i < bm.iterations; i++ ) {
106106
dist.a = y[ i % y.length ];
107-
if ( dist.a !== y ) {
107+
if ( dist.a !== y[ i % y.length ] ) {
108108
bm.fail( 'should return set value' );
109109
}
110110
}
111111
bm.toc();
112-
if ( isnan( y ) ) {
112+
if ( isnan( dist.a ) ) {
113113
bm.fail( 'should not return NaN' );
114114
}
115115
bm.pass( 'benchmark finished' );
@@ -162,12 +162,12 @@ bench( pkg+'::set:b', function benchmark( bm ) {
162162
bm.tic();
163163
for ( i = 0; i < bm.iterations; i++ ) {
164164
dist.b = y[ i % y.length ];
165-
if ( dist.b !== y ) {
165+
if ( dist.b !== y[ i % y.length ] ) {
166166
bm.fail( 'should return set value' );
167167
}
168168
}
169169
bm.toc();
170-
if ( isnan( y ) ) {
170+
if ( isnan( dist.b ) ) {
171171
bm.fail( 'should not return NaN' );
172172
}
173173
bm.pass( 'benchmark finished' );

0 commit comments

Comments
 (0)