Re: unittest ddoc.

2012-01-31 Thread Jens Mueller
Kapps wrote: > On 30/01/2012 12:34 PM, Don Clugston wrote: > >On 30/01/12 19:28, Marco Leise wrote: > >>Am 30.01.2012, 18:55 Uhr, schrieb Don Clugston : > >> > >>>OR: > >>>/** optionally explain what this test is doing */ > >>>unittest { } > >> > >>Not bad. So a documented unittest would be tur

Re: unittest ddoc.

2012-01-31 Thread Kapps
On 30/01/2012 12:34 PM, Don Clugston wrote: On 30/01/12 19:28, Marco Leise wrote: Am 30.01.2012, 18:55 Uhr, schrieb Don Clugston : OR: /** optionally explain what this test is doing */ unittest { } Not bad. So a documented unittest would be turned into an example section with "optinally

Re: unittest ddoc.

2012-01-30 Thread Gor Gyolchanyan
That's what I said in the original message. I proposed to do this only if the unittest has a ddoc comment. :-) On Mon, Jan 30, 2012 at 10:34 PM, Don Clugston wrote: > On 30/01/12 19:28, Marco Leise wrote: >> >> Am 30.01.2012, 18:55 Uhr, schrieb Don Clugston : >> >>> OR: >>> /** optionally explain

Re: unittest ddoc.

2012-01-30 Thread Felix Hufnagel
+1

Re: unittest ddoc.

2012-01-30 Thread Don Clugston
On 30/01/12 19:28, Marco Leise wrote: Am 30.01.2012, 18:55 Uhr, schrieb Don Clugston : OR: /** optionally explain what this test is doing */ unittest { } Not bad. So a documented unittest would be turned into an example section with "optinally explain what this test is doing" in DDoc? Y

Re: unittest ddoc.

2012-01-30 Thread Marco Leise
Am 30.01.2012, 18:55 Uhr, schrieb Don Clugston : OR: /** optionally explain what this test is doing */ unittest { } Not bad. So a documented unittest would be turned into an example section with "optinally explain what this test is doing" in DDoc?

Re: unittest ddoc.

2012-01-30 Thread Don Clugston
e language too much. A comment shouldn't be executed, come on :p What about: unittest(ddoc) { ... Readable use case example goes here ... } - or - example { ... } OR: /** optionally explain what this test is doing */ unittest { }

Re: unittest ddoc.

2012-01-30 Thread Marco Leise
ouldn't be executed, come on :p What about: unittest(ddoc) { ... Readable use case example goes here ... } - or - example { ... }

Re: unittest ddoc.

2012-01-30 Thread David Nadlinger
On 1/30/12 5:39 PM, Gor Gyolchanyan wrote: Wouldn't it be great if the compiler inserted the body of the unittest ino the ddoc as an example? At least for me, unit tests tend to be more complex/convoluted than example code, because they cover different edge cases, etc., so I'd rather go the o

unittest ddoc.

2012-01-30 Thread Gor Gyolchanyan
I noticed, that a great way to document code is to put the contents of its unittest in an example block of the respective ddoc: /** * Transmogrifies an integer. * Params: * integer = The integer, that will be transmogrified. * Returns: * The transmogrified version of the integer.