Add test filtering and split out tests into .cpp files.