Fix some errors about cpp-tests and lua-tests