These are chat archives for Snaipe/Criterion

Oct 2017
Franklin Mathieu
Oct 15 2017 17:05
@p4p1 the logistics behind it might be a little hard, since Criterion defines its own main, and defining yours means you actively are responsible for calling the runner
I would perhaps recommend abstracting main() from your program into a function
(so that you can call it from the test itself)
alternatively, you could include the main in your library code, and dlsym it
an other possibility could be to pass -Dmain=program_main when compiling your program, so that main becomes substituted to program_main, which is then callable easily