有人知道我是否可以在 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/