Thread overview
[Issue 9758] New: Ddoc: empty ddoc comment and unittest block generates no Examples section
Mar 19, 2013
Kenji Hara
Mar 20, 2013
Andrej Mitrovic
Mar 20, 2013
Andrej Mitrovic
Mar 20, 2013
Andrej Mitrovic
March 19, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9758

           Summary: Ddoc: empty ddoc comment and unittest block generates
                    no Examples section
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ddoc
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2013-03-19 08:24:08 PDT ---
From the discussion in https://github.com/D-Programming-Language/dmd/pull/1765

Currently, this code:

/// test
void foo(){}
///
unittest {  }


Will generate:

void foo();
    test


There is no "Examples:" section, because unittest block has empty ddoc comment and code block. But I think generating "Examples:" section is sometimes useful, even if there is no text. For example making placeholder to represent necessity of later documentation writing.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 20, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9758


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |andrej.mitrovich@gmail.com
         AssignedTo|nobody@puremagic.com        |andrej.mitrovich@gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-03-19 20:51:53 PDT ---
I agree, now that unittest comments are being emitted it makes sense:

/// test
void foo(){}

/// placeholder
unittest {  }

Results in:

void foo();
    test

    Examples:
    placeholder

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 20, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9758



--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-03-19 20:52:07 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1770

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 20, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9758



--- Comment #3 from github-bugzilla@puremagic.com 2013-03-19 22:21:39 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/4fe99dcf6e9feb6c9c29415fc5f2ce4f688051fa
Fixes Issue 9758 - Emit documented unittest block even if unittest body is
empty.

https://github.com/D-Programming-Language/dmd/commit/12dced8314a97dee5676e9f3e9f6b03dbc5d8b2f Merge pull request #1770 from AndrejMitrovic/Fix9758

Issue 9758 - Emit documented unittest block even if unittest body is empty

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 20, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9758


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

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


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