Migrate test files to CMake