Fix some errors in TestCpp