简体   繁体   English

Visual Studio Code C++ 单元测试是否覆盖?

[英]Does Visual Studio Code C++ Unit Test coverage?

We have a C++ project we're developing on Linux with gcc.我们有一个使用 gcc 在 Linux 上开发的 C++ 项目。 We'd like to use Visual Studio Code--if we can ever get it configured properly--but we can't if it won't meet our needs.我们想使用 Visual Studio Code——如果我们能够正确配置它——但如果它不能满足我们的需求,我们就不能。

Does Visual Studio Code show C++ unit test coverage? Visual Studio Code 是否显示 C++ 单元测试覆盖率? For example, like how Eclipse shows code coverage of JUnit tests?例如,Eclipse 如何显示 JUnit 测试的代码覆盖率? Can it even be configured to run unit tests with Google Test, for example?例如,它甚至可以配置为使用 Google Test 运行单元测试吗?

Code coverage reports seems to be available only in real Visual Studio Enterprise edition . 代码覆盖率报告似乎仅在实际的Visual Studio Enterprise版本中可用 For VS Code you can only utilize some command line utils, such as gcov. 对于VS Code,您只能使用某些命令行实用程序,例如gcov。

Here's a link to Gcov Viewer plugin for vscode.这是vscode 的 Gcov 查看器插件的链接。 that uses the output from gcc to Highlight the covered lines.使用 gcc 的输出来突出显示被覆盖的行。 and automate usage of e gcov .并自动使用 e gcov 。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM