Sign in to follow this  

Simple unit testing question

This topic is 4420 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm currently digging into unit testing and while it seems I've understand most of the concepts there is a question that is nowhere directly answered: Do you create a second project for your tests (and a second .exe too) and link to your main project code? (I wouldn't have expected that but there is some evidence to it :) ) Thanks for your revelation TrueTom

Share this post


Link to post
Share on other sites
Generally you do have a second exe for your unit tests. However, usually it's a different configuration of your project rather than a second project. This really depends on the programming language however. Some languages build the unit tests as part of the assembly/class file/module and just have the unit test be a callable entity within that assembly/class file/module.

Share this post


Link to post
Share on other sites
Thanks, using a second project helps to run the tests automaticallly and as an C++ user you are always a second-class citizen... ;-)

TrueTom

PS: After only playing around a day, unit testing improved some of my code tremendously (you know, the parts you don't talk about). Everybody who haven't tried it yet, do it now!

Share this post


Link to post
Share on other sites

This topic is 4420 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this