Is Google Test OK for testing C code?

前端 未结 5 1000
死守一世寂寞
死守一世寂寞 2020-12-25 10:31

So I\'ve come to like and enjoy using Google Test for a C++ project I\'m involved in. I\'m just bringing up a new project that will be straight C (a library) and so far can

5条回答
  •  一整个雨季
    2020-12-25 11:01

    I just thought I'd add another point: since gtest is C++, you'll be parsing your C headers under test as C++. This means the tests don't guarantee that the headers are consumable from C. I recently ran into this with a C library I'm building.

提交回复
热议问题