pdftract/notes/bf-lpyhe.md
jedarden 96d5f0119f docs(bf-6cc3z): verify glob PDF discovery implementation
Implementation already complete in tests/fixture_discovery.rs.
Verified acceptance criteria:
- Discovers 3,353 PDF files in tests/fixtures/
- Uses glob pattern **/*.pdf for recursive matching
- Returns Vec<PathBuf> sorted alphabetically

All tests PASS. Runtime verification confirmed:
✓ All files exist
✓ All files are PDFs
✓ Paths are sorted

Closes bf-6cc3z.
2026-07-06 20:15:30 -04:00

1.8 KiB

Verification Note for bf-lpyhe

Summary

Enhanced assertion messages in unmapped_glyph_names_config.rs with diagnostic context following the pattern established in cmap_unmapped_glyphs.rs.

Changes Made

Modified /home/coding/pdftract/crates/pdftract-core/tests/unmapped_glyph_names_config.rs:

  • Enhanced 11 assertions across 4 test functions
  • Each assertion now includes:
    • Expected value description
    • Actual value description
    • Context about why the expectation exists
    • References to relevant configuration files (build/unmapped-glyph-names.json)

Test Functions Enhanced

  1. test_unmapped_glyph_names_defaults_to_empty - 4 assertions
  2. test_unmapped_glyph_names_specified - 4 assertions
  3. test_unmapped_glyph_names_empty_array - 2 assertions
  4. test_unmapped_glyph_names_minimal_config - 3 assertions

Verification

PASS - All acceptance criteria met:

  • All assertion messages follow a consistent format (expected/actual/why)
  • Each message explains expected value, actual value, and rationale
  • Messages reference build/unmapped-glyph-names.json where relevant
  • No generic assertions without context

Test Results

unmapped_glyph_names_config: 4/4 passed
cmap_unmapped_glyphs: 7/7 passed

Commit

  • Hash: 53585e34
  • Message: "test(bf-lpyhe): enhance assertion messages with diagnostic context"
  • Files changed: 1 file, 119 insertions(+), 13 deletions(-)

Example Enhanced Assertion

assert!(
    config.unmapped_glyph_names.is_empty(),
    "unmapped_glyph_names should default to empty for completely empty config. \
     Expected: empty Vec. \
     Found: {:?}. \
     Why this matters: The #[serde(default)] attribute ensures the field is always present \
     as an empty Vec, never None, even when the entire config is just {{}}.",
    config.unmapped_glyph_names
);