# HG changeset patch # User lindquist # Date 1193299521 -7200 # Node ID 2c39b5292cf3f3c4b989bf8e02ecf86adf0a5157 # Parent b86e00b938a549c2254113924f214f98ef3c1167 [svn r67] Fixed ignore unittests instead of failing to compile diff -r b86e00b938a5 -r 2c39b5292cf3 gen/toobj.c --- a/gen/toobj.c Thu Oct 25 09:48:36 2007 +0200 +++ b/gen/toobj.c Thu Oct 25 10:05:21 2007 +0200 @@ -650,6 +650,11 @@ return; } + if (isUnitTestDeclaration()) { + Logger::println("*** ATTENTION: ignoring unittest declaration: %s", toChars()); + return; + } + Type* t = LLVM_DtoDType(type); TypeFunction* f = (TypeFunction*)t; diff -r b86e00b938a5 -r 2c39b5292cf3 test/unittest1.d --- a/test/unittest1.d Thu Oct 25 09:48:36 2007 +0200 +++ b/test/unittest1.d Thu Oct 25 10:05:21 2007 +0200 @@ -3,3 +3,7 @@ unittest { } + +void main() +{ +}