Jump to content
  • Advertisement
Sign in to follow this  
TrueTom

Simple unit testing question

This topic is 4606 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!