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.
1.8 KiB
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
test_unmapped_glyph_names_defaults_to_empty- 4 assertionstest_unmapped_glyph_names_specified- 4 assertionstest_unmapped_glyph_names_empty_array- 2 assertionstest_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
);