Unit tests for C++ projects

V

Viviana Vc

Hi all,

I have "Visual Studio Team Suite" subscription and now I started to play
with Visual Studio 2005 for creating Test Projects.

The thing I am interested in is the "unit test". I tried out the steps
from:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/VSTSUnitTesting.asp
and everything seems to be fine. But this sample shows creating tests
for methods/classes that you got by creating a C# project -> Class
Library.
I don't use C#, but C++. I created a Windows C++ project with some
classes, but when right-clicking the methods of the class I don't get
the option of creating a test eg "Create Tests...".
Is this feature just for C# projects? If no, why can't I see the "Create
Tests..." when right-clicking on a C++ class/method?

Thx,
Viv
 
C

Carl Daniel [VC++ MVP]

Viviana Vc said:
Hi all,

I have "Visual Studio Team Suite" subscription and now I started to play
with Visual Studio 2005 for creating Test Projects.

The thing I am interested in is the "unit test". I tried out the steps
from:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/VSTSUnitTesting.asp
and everything seems to be fine. But this sample shows creating tests
for methods/classes that you got by creating a C# project -> Class
Library.
I don't use C#, but C++. I created a Windows C++ project with some
classes, but when right-clicking the methods of the class I don't get
the option of creating a test eg "Create Tests...".
Is this feature just for C# projects? If no, why can't I see the "Create
Tests..." when right-clicking on a C++ class/method?

The unit test support in Team System is only for managed code. But all is
not lost - you can create a managed C++ test project to test your unmanged
C++ code. Unfortunately, the fancy "create unit tests" support isn't
there - you have to build it all by hand.

See http://msdn2.microsoft.com/en-us/library/ms243171.aspx for a starting
point.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top