Quit running foreign unittests >_<

Nick Sabalausky via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 9 20:33:01 PDT 2014


On 9/9/2014 11:07 PM, David Nadlinger wrote:
> On Wednesday, 10 September 2014 at 03:00:48 UTC, Nick Sabalausky wrote:
>> separate invocations […] and templates probably could still fuck it
>> all up anyway.
>
> If so, then this is either a critical bug in DMD, or an issue with your
> code (e.g. due to version(unittest) use).
>
> I'm aware of the issues that affect some ways of doing incremental
> compilation, but that's mostly a different story.
>
> David
>

I was thinking about something like this:

//a.d
import b.d;
alias x = Foo!whatever;

//b.d
struct Foo(Arg) {
     void foo() {...}
     unittest { /+...unittest foo()...+/ }
}

// Attempt to exclude module b's unittests, except...aren't
// they compiled when module a's is compiled? The first
// dmd invocation here has no idea module b will be compiled
// without the -unittest flag.
 >dmd -c -unittest a.d
 >dmd -c b.d   // Duplicate a whole buttload of processing here
 >dmd a.o b.o



More information about the Digitalmars-d mailing list