Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

27.3. dmd - Digital Mars D2.x Compiler

27.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