Dec. 4, 2012
2:30 p.m.
On 04.12.2012 12:49, Stéphane Ducasse wrote:
Comments are ***REEEAALLLLY*** important because they help a guy reading the code to say yes you are smart and you got it right I will explain you why.
Even writing comment in test is cool.
Stef I would go so far as to say comments in tests are *especially* important. It's sometimes hard to tell whether a failure is due to a faulty test, or an actual bug, when you have no idea (even when looking at the code) what case the test was actually written to cover. With a comment of what the test was intended to do, you have a better feel for how to handle it.
TL;DR: Intent, while obvious to whoever is writing the test, may not be so clear to whoever is around when it starts failing. Cheers, Henry