Named unittests

Panke via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 30 14:59:39 PDT 2015


>
> I've implemented this in a library and I'm sure others have as 
> well. Are you sure, you want a language solution?

Basic principle:

---
unittest {

     testCase("a testcase",
     {
         // actual test code here
     });
}
---

Testcase registers the structure and the runtime just runs the 
unittest as is does today and than calls all closures registered 
during the unittest. Makes this fully backward compatible.


More information about the Digitalmars-d mailing list