I am not sure how this is thought, but i usually like to make testing so that all functions are mocked, except few special. I make this by linker; i have fake-objects that contains fake implementation of all functions and before that the real ones. This works fine, but to have it even nicer, one wraps the thing to "libfakes.a" that contains all fakes. To make this work, one should mark all fakes with __attribute__((weak)).
This would make minor pull request, that i am super willing to make, but is there a reason why it has been skipped for now?
Hi!
Love this library. I have used it several places, for example in in this arduino testing frame
I am not sure how this is thought, but i usually like to make testing so that all functions are mocked, except few special. I make this by linker; i have fake-objects that contains fake implementation of all functions and before that the real ones. This works fine, but to have it even nicer, one wraps the thing to "libfakes.a" that contains all fakes. To make this work, one should mark all fakes with
__attribute__((weak))
.This would make minor pull request, that i am super willing to make, but is there a reason why it has been skipped for now?
Cheers, Pauli
Here is example of 'fixed' function: