Unittest

bioinfornatics bioinfornatics at fedoraproject.org
Sun Dec 16 10:39:29 PST 2012


Dear,

I would like to understand if to have an empty main file ils need to use
unittest.

I explain i have a library with some unittest section

-- foo.d--

void doFoo(){ ... }
unittest{
  scope(success) writeln( "ok" );
  scope(failure) writeln( "no" );
  doFoo();
}
------


to use unittest i need to have main file which import each library
module as

--- main.d- --
import foo1, foo2, foo3;

void main(){}
-------

why they are not a dflag to do this?

Maybe that is me where is use badly d unittest

thanks



More information about the Digitalmars-d-learn mailing list