There is nothing we can do There is nothing we can do - 4 months ago 41
C++ Question

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?


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...