On 12/5/2014 1:01 PM, H. S. Teoh via Digitalmars-d wrote:
On Fri, Dec 05, 2014 at 08:43:02PM +0000, paulo pinto via Digitalmars-d wrote:For example, you can have coverage without asserts.Exactly!! auto func(...) { ... } unittest { auto x = func(...); // woohoo, I got me some test coverage! } // haha, nobody would even notice when it fails!
It does at least two things: 1. the code doesn't crash2. the code being tested is reachable (coverage testing can reveal unreachable code, which is a bug)