Skip to content

Feat/test coverage (6/8)#47

Closed
bnomei wants to merge 21 commits intotoon-format:mainfrom
bnomei:feat/test-coverage
Closed

Feat/test coverage (6/8)#47
bnomei wants to merge 21 commits intotoon-format:mainfrom
bnomei:feat/test-coverage

Conversation

@bnomei
Copy link
Copy Markdown

@bnomei bnomei commented Jan 7, 2026

Linked Issue

Closes #

Description

Expand test coverage with fuzz targets, a benchmark harness, and boundary/spec edge-case tests to catch regressions early. This adds encode/decode fuzzing, criterion benchmarks, and tests for max depth, large arrays, long strings, empty structures, and spec edge cases. Coverage stats are captured to track progress. This is PR 6 of 8 in the intended sequence (1-8).

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Changes Made

  • Add fuzz targets for encode/decode and a benchmark harness for encode/decode.
  • Add boundary tests for max depth, large arrays, long strings, and empty structures.
  • Add spec edge-case tests for keys, delimiters, quoting, and numeric rules.

SPEC Compliance

  • This PR implements/fixes spec compliance
  • Spec section(s) affected:
  • Spec version:

Testing

  • All existing tests pass
  • Added new tests for changes
  • Tests cover edge cases and spec compliance

Tests run: cargo test
Fuzzing: short runs completed (nightly)
Benchmarks: harness added; not run yet

Pre-submission Checklist

  • My code follows the project's coding standards
  • I have run code formatting/linting tools
  • I have added tests that prove my fix/feature works
  • New and existing tests pass locally
  • I have updated documentation if needed
  • I have reviewed the TOON specification for relevant sections

Breaking Changes

  • No breaking changes
  • Breaking changes (describe migration path below)

Migration path:

Additional Context

Coverage snapshot (cargo llvm-cov):

  • Default features: Lines 60.63%, Regions 61.34%, Functions 62.74%
  • Library-only: Lines 87.37%, Regions 86.05%, Functions 90.07%

Branch: feat/test-coverage
Intended PR order: 1-8 (this is PR 6 of 8)

@bnomei bnomei requested review from a team and johannschopplich as code owners January 7, 2026 20:47
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