Skip to content

Tests: sort line numbers #23

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

Merged
merged 2 commits into from
Jan 24, 2018
Merged

Tests: sort line numbers #23

merged 2 commits into from
Jan 24, 2018

Conversation

sirbrillig
Copy link
Owner

Errors and warnings (messages) are not always added in line-number order since they can be added by different sniffs or different parts of a sniff in whatever order the sniff chooses. That's fine, but our tests aren't particularly concerned with the order of the messages, just if they exist on the correct lines.

This change sorts all the line numbers being reported for tests so that we can assume they are always in increasing integer order.

Sometimes the line numbers from warnings or errors are not in order.
This sorts the results making it easier to write tests for the line
numbers regardless of order.
@sirbrillig sirbrillig merged commit e17df73 into master Jan 24, 2018
@sirbrillig sirbrillig deleted the update/tests-sort-lines branch January 24, 2018 22:37
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.

1 participant