-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider splitting tests into one file per API #3
Comments
PS: this suggestion is inspired by https://github.com/mborgerson/OpenXBOX/tree/master/src/kernel |
The issue with the current grouping per prefix is that it doesn't make much sense anyway: the functions interact, and the prefixes are mostly irrelevant. I don't think that changing all 379 files will be a typical issue. The test start and end could be hidden in macros (although this strongly interacts with #2 ). So I agree with the proposal: a single file per function does sound okay, if we continue to use nxdk and C, without another unit-testing framework (which might not require code at all). |
In my opinion, prefixes are important as it can help group APIs better. I propose to use prefix per folder then inside each folder don't include prefix of each API file, or do include, either way will be fine for me. That way, we will have cleaner directory to navigate. Some of APIs aren't really worth writing test since other APIs could already included the tests. Also, I rather have all of source code files inside src folder than everything at top directory which isn't cleaner view. Re-haul file system in my opinion should look like:
and so on. |
Currently, tests are grouped together according to kernel prefix (Ob, Ex, Mm, etc).
It's probably better to create a separate test file per API, because otherwise there's a real chance some test files will become too big. Also, having separate test file per API results in a cleaner revision history.
This comes at a cost though:
This last point makes it even more important to get the testing framework "first-time-right" (see issue #2).
The text was updated successfully, but these errors were encountered: