Thread overview
[Issue 3461] New: Unittests and assert don't work at all
[Issue 3461] Unittests and assert don't work at all (Mac D1 only)
Jun 24, 2010
Don
Aug 09, 2010
Don
Feb 06, 2011
Brad Roberts
Feb 01, 2012
Walter Bright
October 31, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3461

           Summary: Unittests and assert don't work at all
           Product: D
           Version: 1.050
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: uewyrwie@sogetthis.com


--- Comment #0 from uewyrwie@sogetthis.com 2009-10-31 14:43:31 PDT ---
Executables compiled with dmd -unittest don't run unit tests at all.

assert() is checked at compile time (i.e. assert(0) triggers warnings about
unreachable code), but has no effect at run time (tried compiling with -debug).

Both 1.050 and 1.048 fail on Snow Leopard (32-bit kernel mode). 2.035 with same code, same switches runs the tests.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 24, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3461



--- Comment #1 from Don <clugdbug@yahoo.com.au> 2010-06-24 00:43:21 PDT ---
Can somebody please check if this bug is still valid? It's hard to believe that
anyone could be using DMD1 on OSX if this still applies.
If it still fails, is it really a regression? Was there ever a version of D1
where it worked?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 09, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3461



--- Comment #2 from Don <clugdbug@yahoo.com.au> 2010-08-09 06:11:46 PDT ---
Fawzi has confirmed this is still current. Bug 2726 seems to be the root cause.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 06, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=3461


Brad Roberts <braddr@puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|x86_64                      |x86


--- Comment #3 from Brad Roberts <braddr@puremagic.com> 2011-02-06 15:39:33 PST ---
Mass migration of bugs marked as x86-64 to just x86.  The platform run on isn't what's relevant, it's if the app is a 32 or 64 bit app.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=3461


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |WORKSFORME


--- Comment #4 from Walter Bright <bugzilla@digitalmars.com> 2012-01-31 19:16:35 PST ---
The following program:

import std.stdio;

unittest
{
    writefln("in unittest");
}

void main()
{
    writefln("in main()");
}

compiled with:

dmd foo -unittest

prints:

in unittest
in main()

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------