[CMake] Fix newly added test FindCXXInitializerList.cmake.

Fix some problems with the test and clean up formatting.