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