Skip to content
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

Simplify function names in unit test #114

Open
jphickey opened this issue Dec 10, 2021 · 0 comments
Open

Simplify function names in unit test #114

jphickey opened this issue Dec 10, 2021 · 0 comments
Labels
unit-test Related to coverage or functional tests

Comments

@jphickey
Copy link
Contributor

The function names in the unit test code are absurdly verbose. Some of these unit test function names are 150+ characters in length (exceeding the clang-format line length limit on their own!).

This could be considered coding style, but this is so excessive that it warrants pruning them all back - Note that for portability, symbol names should ideally be kept under 32 significant characters. This is per ISO STD C9899 section 5.2.4.1 - This says that an implementation is only required to recognize 31 significant chars on an external symbol name, or 63 on a local symbol name. The fact that this goes so far beyond the c99-specified limits is a good reason to fix it.

Example:

void Test_CF_CFDP_S_CheckAndRespondNak_CallTo_CF_Chunks_GetFirstChunkReturns_nonNULL_CallTo_CFDP_S_SendFileData_ReturnsLessThan_0_ThenReturn_neg1(

Descriptive content on what the test is supposed to do belongs in comments, not within the function name itself.

@jphickey jphickey added the unit-test Related to coverage or functional tests label Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unit-test Related to coverage or functional tests
Projects
None yet
Development

No branches or pull requests

1 participant