fix TestCpp compile errors