Repository navigation
An expectation for a subject whose observable is text - #17
Merged
Merged
Conversation
Every assertion here that names a node also demands a non-zero box. That is right for a control, a panel or an icon, and wrong for a heading, because a heading is exactly as wide as its line and exactly as tall as its shaped glyphs. On a host with no font registered it lays out at 1328x0, and a check about it fails while the engine did nothing wrong. Not hypothetical. All six of ps-blitz's activation fixtures report their outcome by appending a heading whose text says what happened -- "Press saw true, left false" -- and assert it with `PaintsNamed`. All fourteen checks failed the moment `qa-inspect-host` stopped enabling `system-fonts`. They had only ever passed because the host carried a font catalogue, which is precisely what a headless check must not need. The claim on record that they passed "against a host with no font at all" was measured against a host that had one. `Present` asks what those checks mean: did the node the document was supposed to produce appear, with the name it was supposed to have, and was it laid out. It stays falsifiable in the two ways that matter, both measured rather than asserted. Repointing `cancelled-click` at `heading:Not In This Document` fails with "no node matching ... exists in the tree" while the other five fixtures still pass, so it discriminates. A node created but never laid out fails on the bounds. What it deliberately does not claim is that glyphs reached the scene: that is a question about fonts, not about the engine, and there is no way to ask it on a machine that has none. `Paints` and `PaintsNamed` are unchanged and remain correct for anything with a box of its own. They are stronger, and they cost nothing on a fontless host. Minor bump rather than patch: this adds a variant to a public enum, so a match over `Expect` in a downstream crate stops compiling. Verified against ps-blitz's suite with a host built from this checkout and no `system-fonts` anywhere in its graph: 6 of 6 fixtures, 14 of 14 checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every assertion here that names a node also demands a non-zero box. That is right for a control, a panel or an icon. It is wrong for a heading, because a heading is exactly as wide as its line and exactly as tall as its shaped glyphs. On a host with no font registered it lays out at
1328x0, and a check about it fails while the engine did nothing wrong.This is not hypothetical
All six of ps-blitz's activation fixtures report their outcome by appending a heading whose text says what happened —
"Press saw true, left false"— and assert it withPaintsNamed. All fourteen checks failed the momentqa-inspect-hoststopped enablingsystem-fontsin #15:They had only ever passed because the host carried a font catalogue, which is precisely what a headless check must not need. The claim on record that they passed "against a host with no font at all" was measured against a host that had one.
What
PresentasksDid the node the document was supposed to produce appear, with the name it was supposed to have, and was it laid out.
It stays falsifiable in the two ways that matter, and both are measured rather than asserted:
cancelled-clickatheading:Not In This Documentfails withno node matching "heading:Not In This Document" exists in the tree, while the other five fixtures still pass. So it discriminates rather than failing everything.What it deliberately does not claim is that glyphs reached the scene. That is a question about fonts rather than about the engine, and it cannot be asked on a machine that has none.
PaintsandPaintsNamedare unchanged and remain correct for anything with a box of its own. They are stronger, and they cost nothing on a fontless host.Breaking, hence 0.6.0
Adding a variant to a public enum stops a downstream
matchoverExpectcompiling. Minor bump rather than patch.Verified
Against ps-blitz's suite, with a host built from this checkout and no
system-fontsanywhere in its graph: 6 of 6 fixtures, 14 of 14 checks. The paired ps-blitz change is pathscale/ps-blitz#87, whoseDebug controljob builds ps-qa from this branch's master and cannot go green until this lands.