views:

46

answers:

2

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?

A: 

as requested

http://msdn.microsoft.com/en-us/library/ms243171.aspx

http://jendrikillner.wordpress.com/2009/05/06/unit-testing-c-with-the-visual-studio-unit-testing-framework/

a video http://www.youtube.com/watch?v=2fxl7zMzfFM

John Nolan
@John thanks any idea what '^' means and why is he using gcnew instead of new? It's not C++.
There is nothing we can do
in the example video the test project is C++/CLR calling the COM interface of the C++ lib
Greg Domjan
@John but how does it explain use of ('^' - xor) and what gcnew has to do with C++?
There is nothing we can do
A: 

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

paul_71