Gcov查看代码覆盖率
编译时添加参数-fprofile-arcs -ftest-coverage
链接时-lgcov
运行程序,会生成*.gcda文件
lcov -c -d . -o test.info --rc lcov_branch_coverage=1生成覆盖率文本报告
genhtml --branch-coverage -o result test.info生成一个result文件夹
编译时添加参数-fprofile-arcs -ftest-coverage
链接时-lgcov
运行程序,会生成*.gcda文件
lcov -c -d . -o test.info --rc lcov_branch_coverage=1生成覆盖率文本报告
genhtml --branch-coverage -o result test.info生成一个result文件夹