-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Remove final keyword from first party reporters #2887
Comments
You will end up with your own reporter either way, and I would rather have you copy paste The underlying reason is simple, I do not want to have to consider whether a refactoring to reporters changes their behaviour if some of the functions are overridden and some are not. As an example, right now the ConsoleReporter only responds to |
Also I am told that I should ask you if you work at Roblox 😃 |
Okay, that makes sense. And to your question, yeah 😊 |
Description
I don't know why the first party reporters are "not intended to be inherited from," but for my use case, all I want is a
ConsoleReporter
that doesn't print the test spec filter at the start of each run. To me, the most reasonable option is to inherit fromConsoleReporter
and overridenoMatchingTestCases()
andtestRunStarting()
, but I can't do that when it'sfinal
.I could just edit
ConsoleReporter
in our fork, but I would prefer to not have to keep a version that's slightly out of sync with the base repo.Additional context
My team's custom
main()
generates a ridiculously long filter based on a file that lists excluded tests. This is to accommodate legacy tests that were written with Boost.Test macros. We redefined those macros to map to Catch2 along with some extra legwork for keeping track of suites and constructing case names. Right now it floods the console with about 90k characters.I also need to print out a special message for our meta-test-runner to recognize at the start and end of runs and cases, and I could do that with an event listener, but it seems more elegant to just override those few
ConsoleReporter
functions.The text was updated successfully, but these errors were encountered: