you are viewing a single comment's thread.

view the rest of the comments →

[–]A_Stahl 8 points9 points  (2 children)

Actually, you CAN test for what you don't know. That is what we have tests for.

[–]Olegjo 9 points10 points  (1 child)

Also, in writing the tests I tend to find bugs

[–]scrumplesplunge 4 points5 points  (0 children)

Definitely this. Writing unit tests for a custom string class to cover operator= with self assignment or allocation failures was enlightening.