开发者

Microsoft::VisualStudio::TestTools::UnitTesting to test c++ projects

Can I use Microsoft::VisualStudio::TestTools::UnitTesting to test C++ code? I mean I already have an existing C++ project which 开发者_运维百科doesn't use .NET.

Now I want to write unit tests to test this code.

Can I use UnitTesting framework from Microsoft to test this native Cpp code?

Thanks a lot

Best Regards, Marc


Yes but with some more additions

  1. You need to include the "CppUnitTest.h" ofcourse
  2. Update the linker directories to include $(VCInstallDir)UnitTest\lib
  3. Update the include paths to include $(VCInstallDir)UnitTest\include

Hope that helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜