extract unit test macro to a file