Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Add example for Runtime.moduleUnitTester #1656

Merged
merged 3 commits into from
Sep 23, 2016

Conversation

Abscissa
Copy link
Contributor

No description provided.

Copy link
Member

@MartinNowak MartinNowak left a comment

Choose a reason for hiding this comment

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

How about formatting the example according to D's style guide?

@Abscissa
Copy link
Contributor Author

The example (at least the body of customModuleUnitTester) was ripped straight from the default implemention in Druntime itself. Not sure exactly what needs changed.

@jmdavis
Copy link
Member

jmdavis commented Sep 22, 2016

I assume that he's talking about the spacing on the loop, if statements, and catch. e.g. the foreach should be

foreach (m; ModuleInfo)

The style guide now requires that the keyword in those cases be followed by a space, and while the guide does not actually indicate the spacing inside the parens, almost none of Phobos has spaces around what's inside the parens.

But there's definitely code floating around still that doesn't quite follow the current style guide, which is presumably why the code that you pulled doesn't match the current style guide. I think that someone went through most of Phobos and updated after the bit about the keywords in if statements and loops and whatnot needing a space and made that change using dfix, but I'm not sure that anyone did that with druntime.

@MartinNowak
Copy link
Member

MartinNowak commented Sep 22, 2016

Yes Jonathan, the main point here is to be consistent in user documentation.

@MartinNowak
Copy link
Member

Auto-merge toggled on

@MartinNowak MartinNowak merged commit 5c9b0e8 into dlang:master Sep 23, 2016
denis-sh added a commit to denis-sh/druntime that referenced this pull request Sep 27, 2016
Fixup pull dlang#1656 to assign `Runtime.moduleUnitTester` only once.
MartinNowak added a commit that referenced this pull request Sep 29, 2016
Fixup pull #1656 to assign unittester only once.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants