Unit test in VS2010

Does anyone uses this feature of VS2010 for C++ projects? If yes could this person give some links to tutorials or explain how to do it?

Upvotes: 3

Views: 2507

Answers (3)

james
james

Reputation: 11

Here's another interesting link describing how to write Unit Tests in Visual Studio for Native C++.

Upvotes: 1

Paul Michalik
Paul Michalik

Reputation: 4381

You cannot directly use the VS unit test utilities for native c++ pojects. Basically you can unit test only .NET types. Of course, you can write unit tests for a C++/CLI (that's where gcnew and ^ come from) class or struct which wraps native c++ code... so, indirectly, yes, you can use VS to unit test native c++ code, you only need to provide appropriate .NET wrappers. This can be automatized to certain extent, but is still quite tedious. You also need to compile your native c++ project in a special way...

Upvotes: 3

Related Questions