Andrej Mitrovic wrote: > On 2/7/13, Andrei Alexandrescu <[email protected]> wrote: > > I'm very happy that this will be part of the upcoming release: > > https://github.com/D-Programming-Language/dmd/pull/1342 (see also > > http://d.puremagic.com/issues/show_bug.cgi?id=2630) allows defining > > unittests that simultaneously work as documentation. This is a great way > > to simultaneously write meaningful tests and good documentation examples. > > > > If you want to help, feel free to hop on the Phobos documentation and > > convert some of it to use the new feature. > > Kenji and I have been working on getting this feature working > properly, and it should be pretty solid by now in DMD-head. > > But one case where it might not be a good idea to move the embedded > code into unittests is when you have a big comment section, for > example the one for std.algorithm.map. I think this should be a new > enhancement request. Here's part of the documentation for map:
I thought the example (embedded code) is not being moved into unittests rather it's copied. The example will still be shown in the documentation. Why is it a problem with e.g. std.algorithm.map (one big comment)? Thanks for pushing this feature. It's a very useful one. Jens
