【问题标题】:Automated C unit testing自动化的 C 单元测试
【发布时间】:2011-07-22 19:22:29
【问题描述】:

我有一个用 MinGW 编译的 C 库,Eclipse C 项目。库由许多模块组成,每个模块都可以测试。

如何为这个库编写测试、编译并在 Eclipse/CDT IDE 中运行它的最佳方法是什么(使用 MACROS 或其他东西)?

编辑:我看到有些人使用

#ifdef TEST

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

但不知道如何将其插入 Eclipse。

【问题讨论】:

    标签: c eclipse unit-testing gcc mingw


    【解决方案1】:

    我建议将 CuTest 与 Makefile 一起使用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-08-23
      • 1970-01-01
      • 2015-07-13
      • 2013-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多