
[Please do not mail me a copy of your followup] boost-users@lists.boost.org spake the secret code <1522520332.33141712.1365147196271.JavaMail.root@zimbra59-e10.priv.proxad.net> thusly:
Actually, I am doing this tutorial :
http://legalizeadulthood.wordpress.com/2009/07/04/c-unit-tests-with-boost-te... http://legalizeadulthood.wordpress.com/2009/07/05/c-unit-tests-with-boost-te...
And at the end of the page 2, I get "test tree is empty" : the OneHasNoFactors is not seen.
If you look more closely at my tutorial, the static library contains the system under test. The unit tests are *not* in the library containing the system under test. In the section "First Failing Test: Going Red", I wrote: "Add a new source file to the Test project called TestPrimeFactors.cpp and enter this code:" You don't want to mix production code and test code into the same source files, or the same project. If you start to mix them together, it's too easy for production code to somehow start depending on test code, or production code having data in it that is only used for testing and so-on. If you keep the production code and test code separate, then it is harder for test code to accidentally sneak into production code. In these tutorials, I do this by keeping all the unit tests in the project that builds the test executable and all the production code in a static library that is a link input to the test executable. -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com