小编Jak*_*ton的帖子

gcov忽略源文件中的行

我正在使用gcov来衡量我所贡献的c ++库的测试覆盖率.出于某种原因,gcov没有将许多文件中的行识别为可执行文件.在给定文件中的160行中,它会说其中40行是可执行的.例如:

           -:    0:Source:../evo/NK.h
    -:    0:Graph:test_driver.gcno
    -:    0:Data:test_driver.gcda
    -:    0:Runs:1
    -:    0:Programs:1
    -:    1://  This file is part of Empirical, https://github.com/devosoft/Empirical
    -:    2://  Copyright (C) Michigan State University, 2016.
    -:    3://  Released under the MIT Software license; see doc/LICENSE
    -:    4://
    -:    5://
    -:    6://  This file provides code to build NK-based algorithms.
    -:    7:
    -:    8:#ifndef EMP_EVO_NK_H
    -:    9:#define EMP_EVO_NK_H
    -:   10:
    -:   11:#include <array>
    -:   12:
    -:   13:#include "../tools/BitVector.h"
    -:   14:#include "../tools/const_utils.h"
    -:   15:#include "../tools/Random.h"
    -:   16:#include "../tools/vector.h" …
Run Code Online (Sandbox Code Playgroud)

c++ testing profiling gcov gcovr

7
推荐指数
1
解决办法
449
查看次数

标签 统计

c++ ×1

gcov ×1

gcovr ×1

profiling ×1

testing ×1