On Dec 1, 2009, at 2:46 AM, Eero Nevalainen wrote:
Emmanuel Lecharny wrote:
The test is just a safety belt. It does not harm... We should
probably refactor this code to be a bit moe accurate though ...
assert?
Yuck :/
So C-ished..
better have better code !
Wait... what?
I thought the whole point of assertions is to provide these "no harm
safety belt checks", with the side effect that they can be disabled if
there are concerns of efficiency.
I personally like asserts for that reason and for the way it declares
the original developer's assumptions. It's quite helpful when a new
developer starts reading the code base. Finally, it does make code
testing more productive in an open source environment where there are
many cooks in the kitchen.
Regards,
Alan