-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
13d8f97
to
46d3c73
Compare
@@ -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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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 tovisual_runs()
which took a bit of sleuthing but was easy to fix.