test: add descriptive names to all 64 bignum.t assertions#91
Merged
Conversation
…num.t Add descriptive test names to all 64 tests in bignum.t: - check_datum() now accepts a $name parameter for each assertion - check_key_parameters() accepts a $label and generates per-parameter names - Standalone ok() comparisons migrated to is() for better diagnostics - Error pattern checks migrated from ok($@ =~ //) to like($@, qr//) This matches the test modernization done in format.t, padding.t, and rsa.t, giving clear failure messages instead of "not ok 42" with no context. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
atoomic
approved these changes
Mar 15, 2026
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.
What
Migrate all 64 tests in
t/bignum.tfrom bareok()tois()/like()with descriptive test names.Why
Continues the test modernization started in format.t (#86), padding.t (#86), and rsa.t (#85). Bare
ok()failures produce "not ok 42" with zero diagnostic context — descriptive names andis()/like()show expected vs. got values on failure.How
check_datum()gains a$nameparameter; usesis($actual, undef, ...)for the undefined casecheck_key_parameters()gains a$labeland iterates with@PARAM_NAMESto auto-generate per-parameter test names like"full key: n matches expected"ok(eq)→is(),ok($@ =~ //)→like($@, qr//)Testing
make test— all 281 tests pass (10 files).🤖 Generated with Claude Code
Quality Report
Changes: 1 file changed, 32 insertions(+), 30 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline