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

Issue314 exclude classname patterns #630

Merged
merged 5 commits into from Feb 7, 2017

Conversation

mmerdes
Copy link
Contributor

@mmerdes mmerdes commented Jan 18, 2017

Overview

This PR addresses issue #314.
It adds support for filtering classes for exclusion in the ConsoleLauncher, the Gradle JUnit 5 plugin, and the JUnitPlatform runner.


I hereby agree to the terms of the JUnit Contributor License Agreement.

@sormuras
Copy link
Member

@mmerdes The "running tests" documentation of this new -N option is missing, afaics.

}

/**
* Add patterns to the list of <em>included</em> patterns.
Copy link
Member

Choose a reason for hiding this comment

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

That should say excluded. 😉

Copy link
Member

Choose a reason for hiding this comment

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

Though... TBH, you did a great job of finding all other occurrences of included and replacing them. 👍

new String[0]);

if (patterns.length == 0) {
return new String[] {};
Copy link
Member

Choose a reason for hiding this comment

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

No need to create a new array here. That was done in the previous line. So just return patterns if its length is 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True enough, thanks for pointing out. On second thoughts I decided to drop the check for zero length altogether. The following code is robust with respect to zero length arrays and the resulting code is simpler.

@mmerdes
Copy link
Contributor Author

mmerdes commented Jan 19, 2017

@sormuras
Yes, indeed. Thanks for the hint. Will be fixed.

@mmerdes mmerdes force-pushed the issue314-exclude-classname-patterns branch from f23c3ae to 78cc0f4 Compare February 1, 2017 13:53
@marcphilipp
Copy link
Member

Looks good! Please remember to update the documentation of ConsoleLauncher in the User Guide and add an entry to the Release Notes. 🙂

@sormuras
Copy link
Member

sormuras commented Feb 7, 2017

Looks good! Please remember to update the documentation of ConsoleLauncher in the User Guide and add an entry to the Release Notes. 🙂

🎉 #644

@marcphilipp marcphilipp added this to the 5.0 M4 milestone Feb 7, 2017
@marcphilipp marcphilipp deleted the issue314-exclude-classname-patterns branch January 8, 2018 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants