Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何在gtest中获得代码覆盖率?_C++_Unit Testing_Googletest - Fatal编程技术网

C++ 如何在gtest中获得代码覆盖率?

C++ 如何在gtest中获得代码覆盖率?,c++,unit-testing,googletest,C++,Unit Testing,Googletest,我打算用谷歌测试做单元测试。但是gtest不会在控制台中显示代码覆盖率。如何通过使用gtest获得单元测试的代码覆盖率?要获得单元测试的代码覆盖率,您应该使用适当的工具,这取决于您使用的操作系统/编译器/环境。可能重复

我打算用谷歌测试做单元测试。但是gtest不会在控制台中显示代码覆盖率。如何通过使用gtest获得单元测试的代码覆盖率?

要获得单元测试的代码覆盖率,您应该使用适当的工具,这取决于您使用的操作系统/编译器/环境。可能重复