Bug 9758 – Ddoc: empty ddoc comment and unittest block generates no Examples section

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-19T08:24:00Z
Last change time
2013-03-19T23:38:13Z
Keywords
ddoc, pull
Assigned to
andrej.mitrovich
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-03-19T08:24:08Z
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.
Comment #1 by andrej.mitrovich — 2013-03-19T20:51:53Z
I agree, now that unittest comments are being emitted it makes sense: /// test void foo(){} /// placeholder unittest { } Results in: void foo(); test Examples: placeholder
Comment #2 by andrej.mitrovich — 2013-03-19T20:52:07Z
Comment #3 by github-bugzilla — 2013-03-19T22:21:39Z
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