Only compile test.cpp for test builds.