Bug 16990 – Ensure that every Phobos function has a unittest
Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-12-20T03:18:00Z
Last change time
2016-12-27T11:12:47Z
Assigned to
nobody
Creator
greeenify
Comments
Comment #0 by greeenify — 2016-12-20T03:18:25Z
(from the H2 2016 agenda):
> Make sure every function in Phobos has an example
I have started a small script that allows to check for non-public examples:
https://github.com/wilzbach/style-checkers/blob/master/has_public_example.d
Probably the best way to go here is an exclude list as well.
Maybe we should start placing such scripts into Phobos directly?
Comment #1 by greeenify — 2016-12-26T10:18:57Z
The tools has been integrated into the tools repo:
https://github.com/dlang/tools/blob/master/styles/has_public_example.d
run with e.g. dub --root=../tools/styles -c has_public_example -i std
Moreover, there's an open PR to Phobos to enable it with a blacklist:
https://github.com/dlang/phobos/pull/4998
It will introduce this as `has_public_example` Makefile target, thus from the Phobos repo:
make -f posix.mak has_public_example
Help to reduce the blacklist is very welcome!
Comment #2 by greeenify — 2016-12-27T11:12:47Z
*** This issue has been marked as a duplicate of issue 16614 ***