Archive for the 'TDD' Category

Testing Practice: Use your eyes, when necessary

Tuesday, March 7th, 2006

Imagine the situation: You have a third party system, and you would like to query it for some information. You are not sure yet how this information will look like, and it will also change over the course of exploring and discovering said system in your test. Let’s also say, the output is a [...]

How to test if your ASSERT macro is compiled out

Saturday, March 4th, 2006

I am often interested in how specific code works in different build configurations. In the case of a custom ASSERT macro, I want to make sure that it does not evaluate any expression in builds where it is disabled (i.e. it is 'compiled out'). The technique I use is the following:

Let's assume CHECK_EQUALS is a [...]

Have the compiler tell you where to resume work

Tuesday, February 28th, 2006

When I sit down to work, whatever I have previously decided to do next needs to grab my attention as soon as possible. Otherwise my attention begins to wander while desperately looking for my To-Do list. In the case of programming, specifically using Test Driven Development, I try to leave my desk with a failing [...]