Simple unit testing question

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

0

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.