Skip to content

test: add descriptive names to all 64 bignum.t assertions#91

Merged
atoomic merged 1 commit into
cpan-authors:mainfrom
atoomic:koan.atoomic/test-bignum-is
Mar 15, 2026
Merged

test: add descriptive names to all 64 bignum.t assertions#91
atoomic merged 1 commit into
cpan-authors:mainfrom
atoomic:koan.atoomic/test-bignum-is

Conversation

@Koan-Bot
Copy link
Copy Markdown
Contributor

@Koan-Bot Koan-Bot commented Mar 13, 2026

What

Migrate all 64 tests in t/bignum.t from bare ok() to is()/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 and is()/like() show expected vs. got values on failure.

How

  • check_datum() gains a $name parameter; uses is($actual, undef, ...) for the undefined case
  • check_key_parameters() gains a $label and iterates with @PARAM_NAMES to auto-generate per-parameter test names like "full key: n matches expected"
  • Standalone comparisons: ok(eq)is(), ok($@ =~ //)like($@, qr//)
  • Test count unchanged (64)

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

…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 atoomic marked this pull request as ready for review March 15, 2026 23:03
@atoomic atoomic merged commit cdaa8c2 into cpan-authors:main Mar 15, 2026
81 checks passed
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.

2 participants