Can one customize unit tests?

PV pavel_vozenilek at
Sat Aug 3 13:31:02 UTC 2019

Is it possible to somehow customize syntax and running of unit 

How I could use it:

1. Running only the tests from recently modified source files.
2. Ability to add optional timeout constraint into the tests, and 
then check whether the test doesn't exceed it.

     unittests (time < 20 ms) { ... }

3. Checking that tests do not leak memory (where applicable).
4. Invoking tests in both D code and in C, where similar 
framework exists.

I'd looked into the documentation, found nothing, but perhaps I 
just missed it. If it is not possible, is it realistic to (very 
easily) hack the D compiler to implement such feature?

Would such feature also work in betterC?

More information about the Digitalmars-d-learn mailing list