-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add option to filter output #3
Comments
Filtering out |
@bright-star Thanks for the kind words. I'm afraid, however, I don't quite understand your request. Could you clarify what you mean? |
If some portion of the code under test prints to the std streams, the test output will mix those in with the TAP results. I don't use any TAP readers, but the visual noise can be significant. I'm not sure if this is possible with C++ or not, but suppressing output from anything that isn't BugEye's entry point itself would solve this. For an example, here is the repo I was trying BugEye out with. If you run |
I don't know of a good way of doing that. The only thing I can think of would use preprocessor hackery, and I definitely don't want to do that in a library. There are two other ways:
Frankly I find the latter to be the better option, as I as a user of your library wouldn't want it to uncontrollably print things. It's not a very Nice Thing™ to do. |
That's true. |
For clarification, both to @bright-star and to anyone coming across this conversation: I realise my previous comment may be perceived as a ‘my code is perfect, it's you who should change’ type comment. That is most certainly not the intention. The idea of disabling printing to STDOUT (and STDERR) by any code other that of BugEye itself is an interesting one. I would like to be able to implement it, but it would have to be a good implementation; one that doesn't interfere and preferably doesn't use any preprocessor hackery. That being said, I do (personally) think that code that should be unit tested shouldn't ordinarily print anything, or at least be easily configurable not to. This is especially true for library code: I as a library user would expect to be in charge of what gets printed, and I'd be surprised if a call to a library function had such side effects. This doesn't, however, invalidate the feature request. It may be implemented in the future (although not under this particular issue). In summary
The general attitude of BugEye is one of accommodation and adaptation. If it doesn't work well with a particular piece of code let us know and we shall try to solve it. |
I.e.
--quiet
/-q
to reduce the output to just the ‘bad’ stuff (failed tests and their details).This would produce invalid TAP, but it would mainly be meant for human consumption.
The text was updated successfully, but these errors were encountered: