How to include??

Witold Baryluk baryluk at smp.if.uj.edu.pl
Thu Oct 18 18:49:54 PDT 2007


Dnia Fri, 19 Oct 2007 10:45:27 +0900
Bill Baxter <dnewsgroup at billbaxter.com> napisał/a:

> Hey, then maybe that's a good workaround for no imports in unittests.
> Just make a big Test class inside unittest{...} that does all the
> work.
> 
> --bb

I also didn't know that import are possible in classes.

unittest {
  class Test {
    import std.stdio
    static test() {
       ...
    }
  }
  Test.test();
}

hackish :)

Imports in functions and unittest will be also be helpful.

-- 
Witold Baryluk, aleph0


More information about the Digitalmars-d-learn mailing list