c-ares uses gmock : https://google.github.io/googletest/gmock_for_dummies.html

So you'd have to use that framework to write unit tests.

That said, your example of src/lib/ares_android.c would be easier said than done as a unit test for android would actually have to run on an android platform, but typically when compiling for android, you are cross compiling and not compiling and testing natively.

On 10/23/22 5:41 AM, Nikolaos Chatzikonstantinou via c-ares wrote:
Hello list,

How can I create a unit test on git HEAD? Suppose for example I would
like to write tests for the functions under ./src/lib/ares_android.c.

Regards,
Nikolaos Chatzikonstantinou

--
c-ares mailing list
c-ares@lists.haxx.se
https://lists.haxx.se/listinfo/c-ares

Reply via email to