Hanks and Wilson, both 63, sought medical advice after experiencing the symptoms of a cold in Queensland, the actor wrote on Instagram.
They are now isolated in stable condition at an Australian hospital, officials said.
“We Hanks’ will be tested, observed, and isolated for as long as public health and safety requires. Not much more to it than a one-day-at-a-time approach, no?”
In 2013, the actor revealed he had been diagnosed with type 2 diabetes, the more common form. Diabetes UK says people with the condition may experience more severe symptoms of coronavirus, and has issued advice on how to take precautions.
“All the people who were on set have gone home and self-quarantined,” said Gold Coast Mayor Tom Tate.
The studio behind the film, Warner Bros, said it was “working closely with the appropriate Australian health agencies to identify and contact anyone” who may have come into direct contact with the star.