Specifying which Phobos modules to unittest

H. S. Teoh hsteoh at quickfur.ath.cx
Thu May 10 10:14:12 PDT 2012


On Thu, May 10, 2012 at 07:05:27PM +0200, Christian Köstlin wrote:
> On 05/10/2012 06:21 PM, Joseph Rushton Wakeling wrote:
> >Hello all,
> >
> >Is there any way to specify individual Phobos modules to unittest when
> >building, instead of having to do the whole lot?
> >
> >When working on 1 single module, it'd be nice to be able to unittest
> >that one alone and not have to worry about doing the complete set of
> >tests until ready to push back to GitHub.
> >
> >Can anyone advise?
> >
> >Thanks & best wishes,
> >
> >-- Joe
> the tests are not executed at compile time but instead at runtime
> before main(). so you have to compile the modules seperately, and
> only the modules you want to test with the unittest flag.
[...]

This is not true of Phobos; the Phobos makefile has a separate rule for
building (and running) unittests. The OP's question is, how to make this
run only a single module's tests as opposed to the entire Phobos (which
takes a while, since some of the tests are quite extensive).


T

-- 
Chance favours the prepared mind. -- Louis Pasteur


More information about the Digitalmars-d-learn mailing list