www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9524] New: Unittest ddocs fail to appear following ditto

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9524

           Summary: Unittest ddocs fail to appear following ditto
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: hsteoh quickfur.ath.cx


--- Comment #0 from hsteoh quickfur.ath.cx 2013-02-16 21:17:44 PST ---
With latest git HEAD:

--------------------snip--------------------
/// A strange struct
struct S(int d) {
    int[d] x;

    /// A truly strange function.
    auto func(A)(A a) if (is(typeof(A) : S))
    {
        return S!(d+1)();
    }

    /// ditto
    auto func(A)(A a) if (!is(typeof(A) : S))
    {
        return S!(1)();
    }

    /// Example
    unittest
    {
        // This example fails to appear in the doc.
        int y = 123;
    }
}

void main()
{
}
--------------------snip--------------------

HTML output:
--------------------snip--------------------
<html><head>
        <META http-equiv="content-type" content="text/html; charset=utf-8">
        <title>test</title>
        </head><body>
        <h1>test</h1>
        <!-- Generated by Ddoc from test.d -->
<br><br>
<dl><dt><big><a name="S"></a>struct <u>S</u>(int d);
</big></dt>
<dd>A strange struct<br><br>

<dl><dt><big><a name="func"></a>auto <u>func</u>(A)(A <i>a</i>);
<br><a name="func"></a>auto <u>func</u>(A)(A <i>a</i>);
</big></dt>
<dd>A truly strange function.<br><br>

</dd>
</dl>
</dd>
</dl>

        <hr><small>Page generated by <a
href="http://dlang.org/ddoc.html">Ddoc</a>. </small>
        </body></html>
--------------------snip--------------------

Note that the unittest code fails to appear in the docs.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 16 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9524



--- Comment #1 from hsteoh quickfur.ath.cx 2013-02-16 21:19:16 PST ---
P.S. If the unittest is moved _before_ the ditto, then it works.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 16 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9524


hsteoh quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from hsteoh quickfur.ath.cx 2013-08-18 21:41:28 PDT ---
Looks like this has been fixed. Tested on git HEAD
(1a6da16ef112e03607574758b722698f2950b0de).

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