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
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
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
+1
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
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?
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 { }
ouldn't be executed,
come on :p
What about:
unittest(ddoc) {
... Readable use case example goes here ...
}
- or -
example {
...
}
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
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.
10 matches
Mail list logo