473,761 Members | 1,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unit tests for C++ projects

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/de...nitTesting.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
Aug 3 '06 #1
1 1628
"Viviana Vc" <vc*******@hotm ail.comwrote in message
news:4j******** ****@individual .net...
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/de...nitTesting.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
Aug 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2109
by: Naveen Mukkelli | last post by:
Hi, Currently, I've got all my unit tests in a separate class in the same project. Instead of this, I'm planning to move all my tests in a separate project in a single solution. For example let "TargetProject" is the main project in a solution. My plan is to have another project, for example "TestTargetProject" that will
6
4406
by: Droopy | last post by:
Hi, I want to add unit tests in my application using NUnit. At first, I thought to add unit tests in the class that is tested, enclosed in a conditional attribute to remove these unit tests from release code. Though, there is (at least) 2 problems working like that : 1) the class can becoming very large if there is a lot of tests 2) when releasing, the NUnit dll should not be needed => it should not be referenced.
1
224
by: Viviana Vc | last post by:
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...
8
1439
by: Eric | last post by:
I've spent some time this morning looking into unit testing frameworks for ASP.NET 2.0, but none seem satisfactory. I don't have Visual Studio Team Edition, so apparently I can't use Microsoft's solution, and TestDriven.net has no support for web applications. The best I have found is to use NUnit on the .dll that is created when the site is published. However, I have found that this .dll is not updated with each publish, instead new...
1
1802
by: rich_sposato | last post by:
I released version 2.0 of C++ Unit Test Library. You can download it from SourceForget.Net at http://sourceforge.net/projects/cppunittest/ .. I wrote this unit test library because other unit test frameworks always lacked features I considered important. Some only provided output in certain formats, and I had no easy way to choose my own format. Most provided no protection against exceptions. Only a few were useful for unit-testing...
1
1129
by: Richard Lewis Haggard | last post by:
I'm having trouble creating unit tests for some of the projects in my solution. The unit test doesn't seem to recognize that there are classes and methods in some of the projects in a solution and so does not give me the opportunity to ask it to create unit tests for those project classes and members. What's the trick? -- Richard Lewis Haggard General: www.Haggard-And-Associates.com Please come visit here for a couple thousand good...
48
2511
by: Ark Khasin | last post by:
Unit testing is an integral component of both "formal" and "agile" models of development. Alas, it involves a significant amount of tedious labor. There are test automation tools out there but from what limited exposure I've had, they are pricey, reasonably buggy, and require compiler/target adaptation. Out of my frustration with two out of two of them came my own. Its instrumentation approach is based solely on profound abuse of the C
2
2604
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
I was wonder if there is any protocol or suggestions on how to setup unit testing projects in large solution??? If you have a large solution of say 50 projects and add a project for every unit test it could get overwhelming - is there some standards on how to set this up??? Has anyone integrated this into Continuous Integration ???
4
1983
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I am familiar with unit testing but have to implement in a large solution of 100 projects - my concern is Adding Unit test will bloat the solution - taking more time to get all code from SVN and slow compile time for developers -Is there a way to build solution in debug without building all the unit tests -Is there a goos way to oragnize the unit test so there are not alot of projects
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9925
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.