Bug 14383 – [ddoc] documented unittests don't work for module declaration
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-03-31T17:01:00Z
Last change time
2016-02-23T04:20:45Z
Keywords
ddoc, pull
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2015-03-31T17:01:51Z
Sometimes it's useful to have an introductory example for a module, but documented unittest currently don't work for that.
cat > mod.d << CODE
/**
My Module
*/
module mod;
///
unittest
{
auto example = "usage";
}
CODE
dmd -D -c -o- mod
Should produce the same output as this.
cat > mod.d << CODE
/**
My Module
----
auto example = "usage";
----
*/
module mod;
CODE
Comment #1 by andrei — 2015-05-07T18:48:00Z
Just hit this problem as well while documenting std.allocator, and found this as I was submitting.