These are chat archives for Snaipe/Criterion

1st
Apr 2016
Dominik
@kaidowei
Apr 01 2016 11:47
@Snaipe I'm currently working with param-tests and the verbose log of criterion is not very helpful. Is there a way to show the test caller which parameter provoked the fail?
at the moment I prevent that with printing the parameters, when the test fails, but that seems overhead
Franklin Mathieu
@Snaipe
Apr 01 2016 12:31
It's a bit complicated because criterion doesn't know how to print a generic parameter, as it doesn't have much info on it
Dominik
@kaidowei
Apr 01 2016 12:32
maybe an optional param2str method pointer? :)
for the generate array function
Franklin Mathieu
@Snaipe
Apr 01 2016 12:33
yes, that seems like a viable solution
Another possibility would be to use dyncall to pass multiple parameters, much like theories
but I'm not convinced about the practical consequences of this
plus it makes the generating function weird(er)
Dominik
@kaidowei
Apr 01 2016 12:34
would that solve the problem of "test abc failed" vs "test abc (param = x, y, z) failed"?
Franklin Mathieu
@Snaipe
Apr 01 2016 12:35
Theories already do that, so it would be possible for parameterized tests
Dominik
@kaidowei
Apr 01 2016 12:35
ah okay. havent used theories yet
Franklin Mathieu
@Snaipe
Apr 01 2016 12:35
But this happens because by nature theories build metadata on the types it manipulates
so it knows what the type (and how to print it) of a particular parameter is
with the caveat that non-string pointer types are displayed as an address