Parallel execution of unittests

Johannes Pfau via Digitalmars-d digitalmars-d at puremagic.com
Thu May 1 01:42:57 PDT 2014


Am Wed, 30 Apr 2014 13:31:30 -0700
schrieb Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:

> I'd argue for regular identifiers instead of strings - they can be
> seen in stack traces, accessed with __FUNCTION__ etc. -- Andrei

If we actually want to make unittests work just like functions
(__FUNCTION__, identifier which are visible in stacktraces) then we
could also simply declare functions and mark them as (@)unittest:

unittest void myUnittest()
{
    
}

This then allows for further improvements in the future, for example a
unit test can then return a result value (skipped, error, ..) or it
could optionally receive parameters (like some kind of state from a
unittest framework)


More information about the Digitalmars-d mailing list