Skip to content

fix: Validate size parameter in Hex.padLeft/padRight#163

Closed
roninjin10 wants to merge 1 commit intomainfrom
fix/issue-96-hex-pad-validation
Closed

fix: Validate size parameter in Hex.padLeft/padRight#163
roninjin10 wants to merge 1 commit intomainfrom
fix/issue-96-hex-pad-validation

Conversation

@roninjin10
Copy link
Contributor

Summary

Test plan

  • Added tests for invalid size values (-1, 1.5)
  • Ran Hex tests - all 827 tests pass

🤖 Generated with Claude Code

Fixes #96. Hex.padLeft and Hex.padRight now validate that the size
parameter is a non-negative integer, throwing InvalidSizeError for
negative or non-integer values.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
dist Error Error Jan 2, 2026 9:56am
voltaire Error Error Jan 2, 2026 9:56am

Copy link
Contributor Author

@roninjin10 roninjin10 left a comment

Choose a reason for hiding this comment

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

Automated review summary for PR #163 — fix: Validate size parameter in Hex.padLeft/padRight\n\nTouched areas: Hex | Files changed: 6 (+202/-2)\n\n- Tests: yes\n- Types & API: yes\n- Docs: ensure behavior is documented where user-facing.\n- Performance: consider micro-allocations in tight loops.\n\nOutcome: Comment-only review; no blocking issues spotted. Please consider the above suggestions.\n

@roninjin10
Copy link
Contributor Author

Duplicate of merged PR #275 (Hex.pad/padRight validation)

@roninjin10 roninjin10 closed this Jan 4, 2026
@roninjin10 roninjin10 deleted the fix/issue-96-hex-pad-validation branch January 4, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Hex.padLeft/padRight don't validate size parameter

1 participant