Mark
Mark

Reputation: 2261

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

Upvotes: 1

Views: 513

Answers (1)

allen
allen

Reputation: 4647

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

Upvotes: 1

Related Questions