[Issue 11133] New: ddoc: documented unittest outside of version scope

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 27 19:53:09 PDT 2013


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

           Summary: ddoc: documented unittest outside of version scope
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: code at dawg.eu


--- Comment #0 from Martin Nowak <code at dawg.eu> 2013-09-27 19:53:05 PDT ---
I have the following case where I want to split implementations and
documentation. The following unittest should also be used as example in the
docs but that doesn't work.

version (D_Ddoc)
{
    /// Library docs
    struct Library
    {
        /// foo
        void foo();
    }

    // unittests docs only work here, but here they don't run
}
else version (Windows)
{
    // Library impls
    struct Library
    {
        void foo() {}
    }
}
else version (Posix)
{
    // Library impls
    struct Library
    {
        void foo() {}
    }
}

///
unittest
{
    // shared unittest used as example and for testing
    Library lib;
}

-- 
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