[Issue 10835] New: ddoc: Documented unit tests should be allowed to come before the symbol

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 16 21:18:01 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10835

           Summary: ddoc: Documented unit tests should be allowed to come
                    before the symbol
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: eco at gnuk.net


--- Comment #0 from Brad Anderson <eco at gnuk.net> 2013-08-16 21:18:00 PDT ---
I was going through converting some code examples in std.algorithm to use the
great new documented unit tests and I came to the conclusion that it'd be
better if you could put them before the symbol up with the rest of the
documentation.  The code examples are documentation first and unit tests second
and are often used in a narrative fashion in the documentation so splitting
them up is sometimes odd.

Even better would be if you could do something like:

    /**
    Some documentation.
    */

    /// Illustrative example
    unittest { }

    /**
     More documentation.
    */

    /// Another example that fits in with the flow of the documentation
    unittest { }

Sometimes the module documentation has examples peppered throughout the
introduction and this would allow them to be converted to documented unit tests
as well.

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


More information about the Digitalmars-d-bugs mailing list