使用 VS 测试专家进行 C++ 单元测试

标签 c++ visual-studio unit-testing testing

有人知道我是否可以在 VS Test 2010 中测试 native 代码吗?

最佳答案

从 VS2010 开始,Visual Studio 不直接支持 native C++ 单元测试。参见 MSDN ,具体来说:

You cannot have test projects with unit tests that use unmanaged C++.

您仍然可以使用 Visual Studio 进行 native C++ 单元测试,但它不会像其他 VS 功能那样集成。参见 this SO answer用于许多 native 单元测试框架和库。我没有使用过任何一个,所以我不能在那里提供任何指导。

关于使用 VS 测试专家进行 C++ 单元测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3876737/

相关文章:

c# - 更好的 TypeInitializationException(innerException 也为 null)

c# - 为什么 Rhino Stubs 允许我对它们设定期望值?

c++ - 字符串 vector 排序库

c++ - 在 64 位 Excel 中调用 C DLL 以在 VBA 中使用

c++ - decltype 中的成员函数调用

c++ - 为什么我的控制台不等待 VS2010 和 Windows7 中的输入?

c - 在编译时避免变长堆栈数组

CSS 未应用于渲染页面但显示在 IDE 中

c# - EF 通用存储库和工作单元 - 使用 Moq 进行单元测试

angular - 由于未设置 APP_BASE_HREF,在 Angular 6 中测试失败