Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rewriting or breaking function linkage for C unit testing at compile time
- void a_work(void) {
- b_work();
- }
- void b_work(void) {
- do_some_work();
- }
- /* for test, when a_work() calls b_work() I want this to be run */
- void b_work(void) {
- if (fake_b_enabled)
- do_fake_b_work();
- else
- // call the real b_work() somehow
- }
Add Comment
Please, Sign In to add comment