Skip to content

Revamped argument parsing unit-tests #12157

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 3 commits into from
Oct 12, 2017

Conversation

Rostepher
Copy link
Contributor

Purpose

This PR revamps the current argument parsing test suite to use a more declarative (and concise) set of *Option classes in addition to better refining the current behavior of each flag. I've also taken the liberty to add two new test cases that check the exhaustiveness of the generated option unit-tests. The first will ensure that the suite has a test case for every option supported by the argument parser, while the second test ensures that every option has an associated default value.

A note for reviewers the first commit does move some classes and definitions around which makes the changes a little noisy.

@Rostepher
Copy link
Contributor Author

@swift-ci please smoke test

@Rostepher Rostepher force-pushed the arguments-make-me-testy branch from 7adccdf to 195d4f6 Compare October 2, 2017 22:47
@Rostepher
Copy link
Contributor Author

@swift-ci please smoke test

… of Option classes and included a new test for exhaustiveness which should assure that we are always testing every possible option available in the parser.
… to make the test suite more portable since the original hard-coded values were gathered from my development machine.
@Rostepher Rostepher force-pushed the arguments-make-me-testy branch from 195d4f6 to 36c3f47 Compare October 10, 2017 00:18
@Rostepher
Copy link
Contributor Author

@swift-ci please smoke test

@Rostepher Rostepher merged commit d52e3b3 into swiftlang:master Oct 12, 2017
@Rostepher Rostepher deleted the arguments-make-me-testy branch October 12, 2017 21:17
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.

2 participants