dcv icon indicating copy to clipboard operation
dcv copied to clipboard

use documentation unittests to guarantee docs stays in sync with code and compiles (http://dcv.dlang.io/)

Open timotheecour opened this issue 8 years ago • 3 comments

timotheecour avatar Jun 08 '17 11:06 timotheecour

I've setup the example code to have more complete form, with imports, main and all that, so it can be runable. At first I wanted to import each symbol individually, but it seemed to be too much, so I decided to "import" only root package dcv, and link each relevant symbol to it's web documentation, including mir calls.

Theres a ton of work to be done in this part, starting with updating documentation and examples to match the new ndslice API. But anyhow, thank you for reporting this.

Please let me know if there's anything else. If not, please close the issue.

ljubobratovicrelja avatar Jun 13 '17 20:06 ljubobratovicrelja

ya, the simpler the code the better to not scare away people, the important thing is that the code compiles and runs

timotheecour avatar Jun 13 '17 21:06 timotheecour

reopening as I'm noticing the examples are in readme.md instead of embedded in code.

why not use documentation unittests? (https://dlang.org/spec/unittest.html) This will guarantee they stay in sync with code changes, just as is done in phobos and other projects

timotheecour avatar Jun 14 '17 06:06 timotheecour