Pulled tests into their own routine to remove #ifdef's and recompiles.