News for hackers. Stuff that matters.
Re:Why Most Unit Testing is Waste (2014) [pdf] by sangnoir on Monday May 30, 2016 @03:34AM (#11800091)
> Even for the extremely simple "two, a function that, given no arguments, returns the number 2", your unit test can't verify that to be _always_ true

That is true, I don't think anyone argues against that point. What unit tests do, is verify that under the code works under specific conditions (as defined in the test's set up). When unit tests fail under those specific conditions, then you know there is a problem.

Another thing I like about unit tests is that it is much easier (and faster) to test different combinations of conditions

There are no comments on this comment yet.