>>14
I hate to contaminate my code with tests. I usually put tests on separate files and have them running at night everyday, and read the results first time in the morning.
This means that you write your tests first, create simple test-data at first and later populate this test-data with problematic cases, and run your full test suite everyday if possible. It makes programming complex system less annoying.