To me, unit testing is a way to prevent regressions and try to enforce contracts. Because the same developer usually writes the tests and the code, they have 'the curse of knowledge' and seem to me unlikely to find a lot of bugs this way.
That said, preventing regression is tremendously important. Especially after some turnover on who works on the code.
That said, preventing regression is tremendously important. Especially after some turnover on who works on the code.