test: add tests for @stdlib/ndarray/base/descriptor#12111
Closed
Planeshifter wants to merge 3 commits into
Closed
Conversation
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
- add Complex128Array accessor buffer test - add reference sharing assertions in new-object-per-invocation test - remove redundant instanceof check in plain-object test - fix `offset` type annotation in REPL docs from `integer` to `NonNegativeInteger` https://claude.ai/code/session_01GTF5Fd7tpLA6P9wL4DwWcY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves https://github.com/stdlib-js/todo/issues/2768.
Description
This pull request:
@stdlib/ndarray/base/descriptoroffsettype annotation indocs/repl.txtfromintegertoNonNegativeInteger(consistent with the JSDoc annotation inlib/main.js)Specifically, this PR expands the test suite from 2 tests (8 assertions) to 15 tests (81 assertions), adding coverage for:
Float64Arraytyped bufferFloat32Arraytyped bufferInt32Arraytyped bufferComplex128Arrayaccessor buffer (exercises the accessor buffer path documented in the REPL)[n])[], strides[0])[2,3,4])dtype, data, shape, strides, offset, order— the V8 hidden-class guarantee documented in the package READMEdata,shape,strides) are sharedAdditionally, all existing
deepEqualassertions forshapeandstrideswere changed tostrictEqualto verify that the function stores the original array references rather than copies, which is the intended behavior per the performance motivation documented in the README.Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code.
@stdlib-js/reviewers