std.unittests for (final?) review

Jens Mueller jens.k.mueller at gmx.de
Mon Jan 3 03:17:38 PST 2011


> On Monday 03 January 2011 02:39:59 Jens Mueller wrote:
> > Jonathan M Davis wrote:
> > 
> > What do you mean by "running normally"? I think since they are compiled
> > away with -release they are not run normally.
> 
> I mean when the program is running. If you're running a debug version of your 
> program (which is perfectly normal and common), the contracts are going to run. 
> They're _supposed_ to run while the program is running. That's the point. 
> Naturally, you compile them out for release, but contracts need to be written in 
> way that the program works just fine with them compiled in.

I see. You're right. If one uses unittest.d in contracts than they won't
work in all builds, namely the build with no -release and no -unittest.

Jens


More information about the Digitalmars-d mailing list