You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to have debug printing in my tests so when something fails, there is more context. I would like this to only occur if the -v option has been given when executing. Is there a way to access this executable option so I can implement my own cout that will first check that option?
Thanks.
The text was updated successfully, but these errors were encountered:
Yes, it is possible, but it isn't super easy at the moment. The reason is that the TestOutput has no getter for the verbose flag (tell, don't ask principle) and there is no direct access to the command line arguments after they have been parsed (as far as I know).
However, it is possible by making your own ConsoleTestOuput and your own TestRunner. The TestRunner createConsoleOutput will create the output (which you can replace with your own) and then the output::verbose is called to set the output to verbose mode.
Hi!
I want to have debug printing in my tests so when something fails, there is more context. I would like this to only occur if the -v option has been given when executing. Is there a way to access this executable option so I can implement my own cout that will first check that option?
Thanks.
The text was updated successfully, but these errors were encountered: