I am currently unit testing some C code and I am faced with a problem:
Within the code there are called functions that contain inline assembler code for the SPARC 8 architecture.
Since I am doing the unit tests on a x86 architecture, it obviously can’t be compiled. Unfortunately, testing it on the target plattform is not possible for me.
What do you think would be a proper approach for this problem? Should I modify the original code by enveloping the inline assembler code with #ifdef UNIT_TEST #endif
, or is there an alternative solution?