[Interest] How do I mock QHostInfo::lookupHost?

Doogster thedoogster at gmail.com
Sat May 2 21:14:47 CEST 2020


How do I mock QHostInfo::lookupHost() for unit testing?

When I looked for a solution, all I found was someone who just gave up and said:

"Unfortunately QHostInfo::lookupHost is a static method, so we can’t
mock it."

https://github.com/mumble-voip/mumble/pull/3170


More information about the Interest mailing list