[Issue 9730] Allow ddoc unittests to remotely reference declaration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 19 19:40:08 PDT 2013


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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-03-19 19:40:07 PDT ---
(In reply to comment #0)
> class A(T,U,V) {
>     /// 
>     void myMethod() { ... }
> 
>     /// Unittest ddoc
>     unittest {
>         
>     }
> }

Another alternative is to add the ability for template-nested unittests to only
run for specific instantiations. I'm thinking of using UDAs for this. What I
mean is:

(In reply to comment #0)
> class A(T,U,V) {
>     /// 
>     void myMethod() { ... }
> 
>     /// Unittest that only runs for a specific instance
>     @A!(int, int, int)
>     unittest {
>         
>     }
> }

This kills two birds with one stone: Avoids instantiating a lot of unittests,
and allows us to test-document methods inline.

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