是输出,如下所示:
File 'printtokens.c'
Lines executed:47.18% of 195
Branches executed:65.14% of 109
Taken at least once:35.78% of 109
Calls executed:33.33% of 81
printtokens.c:creating 'printtokens.c.gcov'
由GCOV存储在某处生成的?如果不是,我们如何存储它?
我正试图使用.bat文件为项目生成覆盖率报告,详情如下。
我很少看到.gcov文件。此外,当我单击生成的html输出上的链接时,我无法看到文件详细信息(文件未找到错误)。如何修复它?在执行.bat文件后,会看到类似于‘解析QString.h覆盖数据’的输出(QT库文件)。是预期的吗?
我见过许多相关的问题,但我想不出
(in report_coverage.bat)
set GCovrpath= C:\python37\script\lib\
set GCovpath= C:\abc\ghj\bin\
set datafiles= C:\source\mywork\ro
我使用gcc和gcov的覆盖支持来分析一个大型项目的覆盖范围。我也在进行随机测试,试图扩大覆盖范围。理想情况下,当我生成一个测试时,如果它增加了任何覆盖度量,我想保存它。
要解决这个问题,有什么强有力的方法呢?
例如,假设我们有这样的东西
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[]) {
int x, y;
x = atoi(argv[1]);
y = atoi(argv[2]);
if (x < 0 || y < 0) {
x = -