Hi Author
I have numerous articles on using the preprocessor for adding tests to legacy c.
https://wingman-sw.com/articles/tdd-legacy-c
You'll find links to articles about specific problems under the headings "Don't Panic". The article on non-portable header (#include Test Double) file is probably a direct hit.
Generally, if you use the preprocessor, it is indicating a design problem. The preferred alternative for off-target unit testing is to use the linker. In my book I show a driver example where IORead() and IOWrite() are substituted by the linker.
HTH, James
James Grenning -- Author of TDD for Embedded C - wingman-sw.com/tddec
Join my live-via-the-web TDD Training

wingman-sw.com -- blog --@jwgrenning -- facebook
--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/171ec7a9-6168-4aab-ac59-8a249c49838c%40googlegroups.com.
I mean 'Arthur'
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/7C722A33-672A-438F-BAE9-920304C537B8%40grenning.net.