Add jsnums-test spec for canonical BigInteger representation (re-do)#1868
Open
jpolitz wants to merge 2 commits into
Open
Add jsnums-test spec for canonical BigInteger representation (re-do)#1868jpolitz wants to merge 2 commits into
jpolitz wants to merge 2 commits into
Conversation
Joe says:
Trying to work my way through different image library tests in orthogonal
easy-to-review commits
Claude says:
Adds an `it("BigInteger uses a canonical representation (toEqual works)")`
block that pins down the invariant established by the bnpClamp delete-loop
in eb0d524: two BigIntegers representing the same number, built via
different paths, must be structurally equal (jasmine `toEqual`), not just
numerically equal (`JN.equals`).
Verified the spec catches the regression: temporarily short-circuiting the
bnpClamp delete-loop fails with "Expected object not to have properties:
18: 33554432" — the phantom-slot symptom the fix addresses.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…-canonical # Conflicts: # tests/jsnums-test/jsnums-test.js
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.
Supersedes #1867, which I closed after Copilot mis-resolved the conflict by merging
masterinto the branch (the PR is based onhorizon). Same single commit, this time merged fromhorizonso the only diff is the newit(...)block.Joe says:
Trying to work my way through different image library tests in orthogonal easy-to-review commits. @blerner let me know if this is helpful as a workflow.
Claude says:
Adds an
it("BigInteger uses a canonical representation (toEqual works)")block that pins down the invariant established by the bnpClamp delete-loop in eb0d524: two BigIntegers representing the same number, built via different paths, must be structurally equal (jasminetoEqual), not just numerically equal (JN.equals).Verified the spec catches the regression: temporarily short-circuiting the bnpClamp delete-loop fails with "Expected object not to have properties: 18: 33554432" — the phantom-slot symptom the fix addresses.