C ++代码覆盖工具在命令行上运行 [英] C++ code coverage tool running on command line

查看:207
本文介绍了C ++代码覆盖工具在命令行上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用代码覆盖工具编写单元测试用例。我有一个代码覆盖工具,但只需要做一切通过其GUI界面。理想情况下,我想得到一个工具,能够产生一个文本输出(.diff是最好的)在个别.cpp文件。这样的工具是否存在?

I use code coverage tool for writing unit testing cases. I have a code coverage tool but only have to do everything through its GUI interface. Ideally I'd like to get a tool that is able to produce a text output (.diff is the best) on individual .cpp files. Does such a tool exist?

推荐答案

gcov 可以并且确实产生文本输出。请确保您使用最近的gcc获取共享库的覆盖。

gcov can and does produce text output. Make sure you use a recent gcc to get coverage of shared libraries.

我不知道如何可以通过diff输出coverage?

I'm not sure how you can have diff output of coverage though?

这篇关于C ++代码覆盖工具在命令行上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆