changeset 63:2c39b5292cf3 trunk

[svn r67] Fixed ignore unittests instead of failing to compile
author lindquist
date Thu, 25 Oct 2007 10:05:21 +0200
parents b86e00b938a5
children b688ad419f8c
files gen/toobj.c test/unittest1.d
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 
--- 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()
+{
+}