Testing with Visual Studio Test 2010

Does any one know if I can test native code in VS Test 2010?

Upvotes: 2

Views: 256

Answers (3)

DesignFirst
DesignFirst

Reputation: 329

you can find here an interesting way to do it.

Upvotes: 1

Greg Domjan
Greg Domjan

Reputation: 14115

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.

Upvotes: 0

Steve Townsend
Steve Townsend

Reputation: 54178

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.

Upvotes: 0

Related Questions