Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

Log the values returned by GENERATE

Open mtvec opened this issue 4 years ago • 1 comments

Whenever I use GENERATE, I find myself using CAPTURE to log the generated value(s) to be able to pinpoint for which value a test case failed. It would be nice if GENERATE would automatically log the returned values (or create a SECTION for them) to make this clear in the default output.

mtvec avatar Oct 12 '21 17:10 mtvec

Agreed in intention. On every cartesian product of all elements in the generators, I would like to have a structured output of those values so that it can be parsed by automation consumers.

Also related to benchmarking. I want to use generators to run samples/benchmarks of code and be able to later consume sampled data as it related to every permutation of the generators. Imagine being able to load the data and the associated generator values into a spreadsheet for charts and pivot tables.

gen 1 gen 2 gen 3 data1 data2
a x h 45 63
a x m 83 24
a y h 632 64
a y m 63 4
b x h 4 37
b x m 87 435
b y h 6 25
b y m 3 4

diablodale avatar Mar 05 '22 21:03 diablodale