From 9c0f18c117b41c02fa7d7880a90e50e90abeea0d Mon Sep 17 00:00:00 2001 From: jedarden Date: Mon, 6 Jul 2026 20:39:44 -0400 Subject: [PATCH] test(bf-5dopl): update unmapped glyph assertion message in resolver.rs Updates the assertion in test_resolve_level2_unmapped_code to use the new diagnostic message format designed in bf-w1o10. - Changed bare assert!(result.is_failure()) to assert!(result.is_failure(), "...") - Added structured message with Expected/Found/Why this matters sections - Clarifies that codes above 0x7F in StandardEncoding are unmapped per build/unmapped-glyph-names.json This completes the assertion message update task. All other unmapped glyph assertions in unmapped.rs, encoding.rs, and test files were already updated with the new format. Closes bf-5dopl. All unmapped glyph tests pass (unmapped, encoding, resolver, cmap). --- crates/pdftract-core/src/font/resolver.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/pdftract-core/src/font/resolver.rs b/crates/pdftract-core/src/font/resolver.rs index f16f805..37006cd 100644 --- a/crates/pdftract-core/src/font/resolver.rs +++ b/crates/pdftract-core/src/font/resolver.rs @@ -870,7 +870,13 @@ mod tests { // Most codes in StandardEncoding are unmapped above 0x7F let encoding = FontEncoding::new(Some(NamedEncoding::Standard)); let result = resolve_level2(&[0x80], Some(&encoding)); - assert!(result.is_failure()); + assert!( + result.is_failure(), + "Level 2 resolution should fail for unmapped character codes. \ + Expected: result.is_failure() == true. \ + Found: false. \ + Why this matters: Most codes in StandardEncoding above 0x7F are unmapped and should fail Level 2 (encoding + AGL) resolution per build/unmapped-glyph-names.json filtering." + ); } #[test]