All steps apply in both test project and test case static library:
1. Check "Instrument Program Flow" in build tab.
2. Check "Generate Test Coverage Files" in build tab.
3. add -lgcov to the "Other Linker Flags" build setting in your Coverage configuration
4. if target is static library, add /usr/lib/gcc/powerpc-apple-darwinxxx/xxx(according to your version) to the target's Library Search Path.
本文介绍如何在测试项目和静态库中设置代码覆盖率工具。具体步骤包括启用程序流程仪器、生成测试覆盖率文件及配置链接器标志。

被折叠的 条评论
为什么被折叠?



