
7 Apr
2007
7 Apr
'07
4:41 p.m.
Hi, I'm using Boost.Test for unit testing a project I am working on. My question is if there is a standard way to set up and structure your unit test project. I am using Eclipse/CDT on Linux and my project is an executable shell script daemon with a bunch of classes compiled and linked into it. In order to unit test the various classes I set up another project, specifically for unit tests that compiles and links in all the classes from the main project. Now, my question is this: do I have one monolithic unittests.cpp file that for all the unit tests or should I set up multiple files which is preferable, e.g. one cpp file per class being tested. Is there a standard "best practices" way to do this? Best Regards, Ari Johannesson