Criterion
Criterion copied to clipboard
Display parameter description for ParameterizedTest?
I'm trying to use ParameterizedTest
. So far so good.
In the output I just see the same suite::name
being logged every time for each parameter.
Is there a way to make this a bit more meaningful by displaying a string description of the parameter?
FWIW, gtest does support this, see https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h#L1409.
Assuming this is not supported, as a work-around, is there a way I can alter the name
part from within the test function itself perhaps?
There is currently no supported way to do so.
Even if you wanted to be really really naughty by changing criterion_current_test->name
from within the test, the runner would get confused because an unknown test would start reporting its failures.
I think the best course of action for you at that point would be to use cr_log_* as a workaround to print which iteration you're in.
@Snaipe Cool, thanks for the quick reply. I'll try logging as a work-around.