Home | Mirror | Search

3. dmd - Digital Mars D2.x Compiler

3.1. -cov do code coverage analysis

$ dmd hello.d -cov

$ cat hello.d
#!/usr/bin/rdmd
import std.stdio;
void main() {
    writeln("Hello, world!");
}

$ dmd hello.d -cov

$ ./hello
Hello, world!

$ cat hello.lst
       |#!/usr/bin/rdmd
       |import std.stdio;
       |void main() {
      1|    writeln("Hello, world!");
       |}
hello.d is 100% covered
			
comments powered by Disqus