Bug 20911 – Documentation for test/unit is non-existant
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-06-08T23:00:53Z
Last change time
2020-08-05T11:40:11Z
Keywords
pull, TestSuite
Assigned to
No Owner
Creator
Walter Bright
Comments
Comment #0 by bugzilla — 2020-06-08T23:00:53Z
Looking at https://github.com/dlang/dmd/tree/master/test/unit:
1. No description of what it is, what it is for, etc.
2. No description of what the files are
3. No description of how to compile them (attempting to compile them just produces lots of compile errors)
4. files like `frontend.d` do not have a SINGLE COMMENT in them
5. no `main` function anywhere
Comment #1 by greeenify — 2020-06-08T23:35:45Z
(answering from my phone - please excuse the brevity)
Basically all your points are answered by the test's readme:
https://github.com/dlang/dmd/blob/master/test/README.md
1-3) You just need to scroll down long enough. In short:
1) test suite which allows to call DMD and thus allowing more advanced tests that just compile or error
2) every file contains test cases like the other test suite
3) ./test/run.d unit (it's also part of the all target if no arguments get passed)
4) Frontend.d does have named unit tests. That's a lot more than most of all test files have no comments.
5) It doesn't need a main function as it is a test file
We don't have a header in every test file with full build and explanations instructions either.
Hence, I'm sorry, but I fail to see actionables here at the moment.
Btw as this is a prime example of the lack of good communication tools. I guess all your questions could have been answered quickly in the #dmd or #ci slack groups. Their content to noise ratios are pretty decent and quick chats there might help you save a lot of time.
Comment #2 by dlang-bot — 2020-08-05T10:28:02Z
@CyberShadow created dlang/dmd pull request #11513 "Fix Issue 20911 - Documentation for test/unit is non-existant" fixing this issue:
- Fix Issue 20911 - Documentation for test/unit is non-existant
Add a short comment at the top of each file describing where to find
the documentation on how to author and run DMD unit tests.
https://github.com/dlang/dmd/pull/11513
Comment #3 by dlang-bot — 2020-08-05T11:40:11Z
dlang/dmd pull request #11513 "Fix Issue 20911 - Documentation for test/unit is non-existant" was merged into master:
- e9d0524ff21c224cd6d6b8354bf74c2fa6f2b6aa by Vladimir Panteleev:
Fix Issue 20911 - Documentation for test/unit is non-existant
Add a short comment at the top of each file describing where to find
the documentation on how to author and run DMD unit tests.
https://github.com/dlang/dmd/pull/11513