Skip to content

test: migrate blas/base/scasum to ULP-based assertions - #16325

Merged
kgryte merged 2 commits into
developfrom
philipp/ulp-blas-base-scasum
Oct 29, 2026
Merged

kgryte merged 2 commits into
developfrom
philipp/ulp-blas-base-scasum

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • migrates the tests of blas/base/scasum (test.scasum.js, test.ndarray.js and their .native.js counterparts) from the EPS/relative-tolerance isApprox helper to isAlmostSameValuef from @stdlib/number/float32/base/assert/is-almost-same-value.
  • passes the ULP count inline as an integer literal. Every call site uses 1 (all fixtures in all four files). Measured minimum: 0 fails, 1 passes at every call site (checked per call site against test.scasum.js and test.ndarray.js; two consecutive runs gave identical results). The .native.js files use the same value but were skipped locally because the native addon is not built in this environment.
  • removes the now-unused EPS/abs requires and the isApprox helper.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Reference Packages

Did the content of this pull request follow one or more existing packages? Answering is optional.

This pull request followed these packages:

  • blas/base/snrm2

What carried over from the reference(s)?

  • Assertion shape (t.strictEqual( isAlmostSameValuef( actual, expected, N ), true, 'returns expected value' )) and removal of the isApprox helper.

What differed, or what did you have to work out yourself?

  • Nothing beyond finding the minimum ULP per call site.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Native tests were not run (addon unavailable); please confirm in CI. Pre-commit hooks could not run locally (incomplete node_modules); eslint was run manually on the test directory and was clean.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was written primarily by Claude Code as an automated scheduled routine.


@stdlib-js/reviewers


Generated by Claude Code

Ref: #11352

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017wWD7Atvdz918auatthNRx
@stdlib-bot stdlib-bot added Good First PR A pull request resolving a Good First Issue. BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). labels Oct 27, 2026
@stdlib-bot

stdlib-bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/base/scasum $\\color{green}369/369$
$\\color{green}+0.00\\%$
$\\color{green}17/17$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}369/369$
$\\color{green}+0.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte added the Tests Pull requests specifically adding tests. label Oct 29, 2026
@kgryte
kgryte marked this pull request as ready for review October 29, 2026 01:24
@kgryte
kgryte requested a review from a team October 29, 2026 01:24
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 29, 2026

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kgryte kgryte removed the Needs Review A pull request which needs code review. label Oct 29, 2026
@kgryte
kgryte merged commit cffc33d into develop Oct 29, 2026
31 checks passed
@kgryte
kgryte deleted the philipp/ulp-blas-base-scasum branch October 29, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Good First PR A pull request resolving a Good First Issue. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants