开发者

Automated C unit testing

开发者 https://www.devze.com 2023-03-22 13:30 出处:网络
I have a C library compiled with MinGW, Eclipse C project. Library consists of many modules, each module can be tested.

I have a C library compiled with MinGW, Eclipse C project. Library consists of many modules, each module can be tested.

What is the best way (using MACROS or somethin开发者_如何学Pythong) how to write tests for this library, compile it a run it in Eclipse/CDT IDE?

EDIT: I've seen that some people use

#ifdef TEST

int main(void)
{
   ...TEST LOGIC...
}
#endif

but don't know how to plug it into Eclipse.


I'd suggest to use CuTest with a Makefile.

0

精彩评论

暂无评论...
验证码 换一张
取 消