Skip to content

UT_SetForceFail is a misnomer #559

@asgibson

Description

@asgibson

Describe the bug
UT_SetForceFail assumes that the value given, that is being set as return value, is a fail condition. There may be sometimes that a function returns more than 1 value that is not considered a fail.

To Reproduce
Use in a unit test where there is a stubbed function with more than 1 "successful" return value.

Expected behavior
Change to something like UT_SetForcedReturnValue to make it more generic.

Code snips
N/A

System observed on:
RHEL 7.6

Additional context
Not a required or debilitating situation, but a name change may be make the function's effects more clear.

Reporter Info
Alan Gibson NASA-GSFC/587

Metadata

Metadata

Assignees

Labels

bugunit-testTickets related to the OSAL unit testing (functional and/or coverage)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions