Skip to content

test: improve assertions in format.t and padding.t#86

Merged
atoomic merged 2 commits into
cpan-authors:mainfrom
atoomic:koan.atoomic/test-improvements
Mar 13, 2026
Merged

test: improve assertions in format.t and padding.t#86
atoomic merged 2 commits into
cpan-authors:mainfrom
atoomic:koan.atoomic/test-improvements

Conversation

@Koan-Bot
Copy link
Copy Markdown
Contributor

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

What

Migrate format.t from legacy Test to Test::More and replace bare ok() comparisons with is() in both format.t and padding.t.

Why

Follows up on PR #85 which did the same for rsa.t. The format.t file was the last test using the legacy Test module. Bare ok($a eq $b) gives no diagnostic on failure — is() shows expected vs got values, making failures immediately actionable.

How

  • format.t: use Testuse Test::More, all 19 assertions converted to is() with descriptive names
  • padding.t: 5 bare ok() comparisons converted to is() with descriptions

Testing

Full test suite passes (281 tests, 10 files).

🤖 Generated with Claude Code


Quality Report

Changes: 2 files changed, 25 insertions(+), 25 deletions(-)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

Koan-Bot and others added 2 commits March 12, 2026 14:27
Replace legacy `use Test` with `use Test::More` and convert all 19
bare ok($a eq $b) comparisons to is($a, $b, "description") for
better diagnostics on failure — showing expected vs got values
instead of just "not ok".

Co-Authored-By: Kōan <noreply@anthropic.com>
Convert bare ok($a eq $b) and ok($a == $b) to is() with descriptive
test names for better failure diagnostics.

Co-Authored-By: Kōan <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@timlegge timlegge left a comment

Choose a reason for hiding this comment

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

lgtm

@atoomic atoomic marked this pull request as ready for review March 13, 2026 02:31
@atoomic atoomic merged commit 59d7e70 into cpan-authors:main Mar 13, 2026
61 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.

3 participants