Unittests not firing?

rikki cattermole rikki at cattermole.co.nz
Fri Jun 11 15:13:17 UTC 2021


rdmd -main -unittest file.d

```d
import std.stdio;

unittest
{
     writeln("first");
}

unittest
{
     writeln("second");
     assert(0);
}
```

Output:

```
first
second
onlineapp.d(11): [unittest] unittest failure
1/1 modules FAILED unittests
```

The first assert to execute should kill the rest of the unittests.


More information about the Digitalmars-d-learn mailing list