Do everything in Java…
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Fri Dec 5 16:22:21 PST 2014
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 crash
2. the code being tested is reachable (coverage testing can reveal unreachable
code, which is a bug)
More information about the Digitalmars-d
mailing list