Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run reordering conformance tests, more docs for reordering, fix bug #105

Merged
merged 8 commits into from
Mar 21, 2023

Conversation

Manishearth
Copy link
Member

Fixes #88

We now run the reordering part of the conformance tests. Good news: we already passed them all for reorder_visual()!. There was a small bug when it came to visual_runs() which took a bit of sleuthing but was easy to fix.

@Manishearth Manishearth requested a review from mbrubeck March 21, 2023 01:30
@@ -637,20 +682,19 @@ impl<'text> BidiInfo<'text> {
// Look for the start of a sequence of consecutive runs of max_level or higher.
let mut seq_start = 0;
while seq_start < run_count {
if self.levels[runs[seq_start].start] < max_level {
if levels[runs[seq_start].start] < max_level {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also update the comment above the loop, which says that this loop uses the original levels instead of the ones for reordering.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, technically it's still not "checking reordering" because in this case that vector doesn't exist here (the reorderings are managed by the runs vector), but ultimately it is checking the "right" levels here unlike the other method which happens to work due to some invariants.

@Manishearth Manishearth merged commit a2a3ba1 into servo:master Mar 21, 2023
@Manishearth Manishearth deleted the reorder-conformance branch March 21, 2023 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conformance tests should check orderings *and* levels
2 participants