I am about to embark on a fair size project. Up until now I write classes/functions with testing functions as part of the same code controlled by #defines and ifdef/ifndef/endif blocks. This works ok for everything I've done so far but all projects have been fairly small and I'm not overly happy with the obfuscation to code readability that this method leads to.
So for you programmers who work mainly on larger projects, what is your testing regime. How do you test your classes and functions and what are the pros and cons of each method?
Do you make a separate project in the same solution?
Do you intergrate your tests within the main project?
Do you use some sort of test framework?
Do your tests cause obfuscation to code readability?

What is basically the best habit to get into for writing tested c++ code?

PS. Any suggested 3rd party frameworks etc. would have to be freely available for me to be interested in them.