Move some additional test macros into functions