-
Notifications
You must be signed in to change notification settings - Fork 79
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
suggestion: onlyTest #92
Comments
Is this functionality not handled through the commandline? If you want to just run one test, then you can use the command-line syntax to specify the test that you want to run. |
It may be (I haven't found such a commandline option), but the way cxxtest is integrated to my current workflow makes it impractical to adjust commandline options back and forth. Additionally, the cxxtest manual has long discussion on how tests are discovered and what kinds of commenting out works and what doesnt (4.6.2. Commenting Out Tests), meaning someone has given this thought before. The solution I propose should be easy to implement and use. The only practical alternative is to do a search-and-replace with "void test" pattern to disable all tests, then enable one. |
Ah, I see the use case. Let me see what I can do. |
fyi: worked around this by adding to the start of every test:
After that, just making the one test one is interested if |
Typical use cases are either to run all tests, or to run a single test (when debugging, or building a new test). Disabling all other tests manually is time-consuming and error-prone.
I suggest the addition of onlyTest function prefix; when found, only that test should be run. This functionality should(tm) be relatively easy to add.
For example:
would run all three tests, while
would only run the Bar test. If more than one "onlyTest" prefixed function is hit, only the first one needs to be run.
The text was updated successfully, but these errors were encountered: