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

Reorder stdlib tests w/ suggested style #3847

Merged
merged 7 commits into from
Oct 5, 2021
Merged

Reorder stdlib tests w/ suggested style #3847

merged 7 commits into from
Oct 5, 2021

Conversation

rhagenson
Copy link
Member

During review of #3819 it was suggested that, given the long list of tests for the "files" package, it would be helpful to have a style guide change for test ordering. My suggestion was to alphabetize tests along with distinct sections for system inclusion/exclusion. I sorted the stdlib as part of this PR so we may use actual changes as useful examples for conversations of style.

Please read the changes here to STYLE_GUIDE.md for the full explanation and examples of my suggested style.

@rhagenson rhagenson added do not merge This PR should not be merged at this time needs discussion Needs to be discussed further labels Sep 16, 2021
STYLE_GUIDE.md Outdated Show resolved Hide resolved
Copy link
Member

@ergl ergl left a comment

Choose a reason for hiding this comment

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

I think everything looks fine now @rhagenson , is there anything else you want to do before removing the do not merge label?

@rhagenson
Copy link
Member Author

Everything here is as I originally wanted to do. Since this PR includes a change to the style guide, I suspect even brief discussion tomorrow during sync is in order.

One related point that I did not approach in this PR is ordering test classes in the same way as calls to those classes within tests(...).

STYLE_GUIDE.md Outdated
Comment on lines 615 to 626
ifdef windows then
test(_TestOnWindowsA)
test(_TestOnWindowsB)
test(_TestOnWindowsC)
end

// Tests below exclude windows and are listed alphabetically
ifdef not windows then
test(_TestOnAllSystemsExceptWindowsA)
test(_TestOnAllSystemsExceptWindowsB)
test(_TestOnAllSystemsExceptWindowsC)
end
Copy link
Member

Choose a reason for hiding this comment

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

This looks fine to be, but I'd like to see the guide specify the order of the ifdef for OS and not.

So for example should ifdef osx come before ifdef windows?

where should "not's" etc be ordered.

I'd like to see a little more specification there.

What the specification is, I don't care. That's all you @rhagenson.

@rhagenson rhagenson removed the do not merge This PR should not be merged at this time label Oct 5, 2021
@jemc jemc merged commit a529622 into main Oct 5, 2021
@jemc jemc deleted the reorder-tests branch October 5, 2021 18:11
@jemc jemc removed the needs discussion Needs to be discussed further label Oct 5, 2021
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.

4 participants