Files
ARCADIA-Studio/harness/experiments/text-diagnostics-20260913/reviews/layout-test-intent.md
T
sorokin.oleg.edu 9fd76aef3a Add current-draft diagnostic underlines and passive hover
Preserve raw include diagnostic provenance and derive bands from the existing shaped editor. Retain deferred tooltip paragraphs through rendering. Include source, regression, failure and native-trial evidence; corrected native acceptance remains pending.
2026-09-13 01:43:22 -07:00

10 lines
1.9 KiB
Markdown

# Actual-layout annotation tests — unrun contribution
Own file only: `C:/ar-text-9e8r6t/crates/oa-desktop/src/source_annotations/layout_tests.rs`. Parent must register `#[cfg(test)] mod layout_tests;` in source_annotations.rs and run after shared compiler work closes. No build or module wiring performed here.
Six tests construct the actual graphics::text::Editor using public Editor::with_text/update and PlainText highlighter, then query its real cosmic buffer. Assertions use source-authored byte ranges plus actual glyph centers/logical cluster identities, visible run tops/heights and expected independent origin/clip. They never call Index/anchor to construct the oracle.
Coverage/falsifiers: second repeated alias only and blank-space misses; narrow actual wrapping plus nonzero scroll, transformed origin and ancestor clip; combining-character partial span cluster expansion, CJK and real RTL with unannotated abc/xyz/left/right neighbors; an actually omitted wrapping-space fixture found in a bounded eight-width set (failure if none), exactly one preceding-run marker and no relocation when that prior run is clipped away; empty-source/EOF/trailing-empty/newline-only/multiline-through-empty-paragraph ownership; mismatched affected source and partly visible bottom row whose underline is fully clipped. Scroll remains unchanged. Real fixture preconditions are asserted, not silently skipped.
No ligature-font guarantee, hover event handling, stale-publication authority, GPU/native paint, IME or focus claim. This scope tests Index projection after actual layout. Parent's current source-index correction remains authority; these tests may expose further defects or fixture errors and are deliberately unrun until parent review/build. A static preparation correction fixed selection of the combining sequence from first ASCII e to exact literal e+combining acute; no executed result is implied.