Does any one know if I can test native code in VS Test 2010?
A:
Apparently not according to the docs here.
You cannot have test projects with unit tests that use unmanaged C++.
This is confirmed by MSFT here.
Steve Townsend
2010-10-06 20:15:46
This is not entirely true
Greg Domjan
2010-10-06 20:45:02
@Greg - let me know why not and I will edit
Steve Townsend
2010-10-06 20:45:34
A:
There was another question here on the stack that I can't find, but it linked me off to How Do I: Create and Run Unit Tests in Visual C++?
This shows that you can unit test native code including C++ but to do so you would still write the unit tests in managed code.
I have not tried this in person, and one thing I noticed was the demo used the COM interface to test the C++ native code, so have no specific experience of using C++ classes more directly in the unit test.
Greg Domjan
2010-10-06 20:49:30