Move test_compiler implementation to its own translation unit