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
- You need to include the
"CppUnitTest.h"
ofcourse - Update the linker directories to include
$(VCInstallDir)UnitTest\lib
- Update the include paths to include
$(VCInstallDir)UnitTest\include
Hope that helps
精彩评论