'live' testing style

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Tue Feb 15 01:00:35 PST 2011


On Sun, 13 Feb 2011 23:03:06 +0100, spir wrote:

> 1. Named unittests allowing test suites in the form of (just an
> example):
> 
> unittest test1 {
>      ...
> }
> unittest test2 {
>      ...
> }
> unittest test3 {
>      ...
> }
> unittest {
>      test1;
>      test2;
>      test3;
> }
> 
> /Unnamed/ unittests are run with --unittest. Named ones are intended to
> be called from unnamed ones. Backward compatible change.

Works now:

  version(unittest) void test1() { ... }
  version(unittest) void test2() { ... }
  version(unittest) void test3() { ... }

  unittest
  {
     test1();
     test2();
     test3();
  }


-Lars


More information about the Digitalmars-d mailing list