Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用代码覆盖工具来编写单元测试用例。我有一个代码覆盖工具,但只需要通过它的 GUI 界面来做所有事情。理想情况下,我想要一个能够在单个 .cpp 文件上生成文本输出(.diff 是最好的)的工具。这样的工具存在吗?
gcov可以并且确实会产生文本输出。确保您使用最近的 gcc 来获取共享库的覆盖范围。
我不确定您如何获得覆盖范围的差异输出?