Catch2
Catch2 copied to clipboard
Make "Randomness seeded to: X" message optional?
Description Currently the message in unconditional: https://github.com/catchorg/Catch2/blob/1f881ab4641b866304b818a063164dae976dba5f/src/catch2/reporters/catch_reporter_console.cpp#L514-L521
So it is shown every single time:
Randomness seeded to: 784548612
===============================================================================
All tests passed (5147 assertions in 174 test cases)
Not denying that this feature is supposedly important in certain use cases, I don't explicitly use Catch2's RNG in my tests and could not care less to what exactly the randomness was seeded, so the message only distracts.
I'd expect it to be exposed by xml and other machine-readable reporters, and even by console when --verbosity high is set, why not, but doing so unconditionally and by default is just annoying.
Thanks

The optimized code includes two additional conditionals based on configuration options specified by the user. The first checks if the user has requested that any test filters be displayed in the console output. The second checks if the user has requested that the random seed used for the test run be displayed in the console output.