I have a header interface.h with a function f()
and its two implementations, imp1.c and imp2.c. Both imp1.c, and imp2.c contain definitions for f()
. I am checking f()
with random inputs, but I want to make sure that the outputs from both imp1.c and imp2.c agree. How can I do that? Is there any way my main function can distinguish between the two implementations? Like
if(imp1.f() != imp2.f()) printf("The implementations differ on input %d", i);