Skip to content

Add tests for object id inline functions #982

@skliper

Description

@skliper

Is your feature request related to a problem? Please describe.
OS_ObjectIdToInteger, OS_ObjectIdFromInteger, OS_ObjectIdEqual, OS_ObjectIdDefined are missing tests.

Describe the solution you'd like
Add tests.

Since these are inline they can be completely exercised via explicit coverage tests (suggest adding to coveragetest-idmap.c).

Note these can be trivial, just need to convert a to and from a range of ID's (note these are just to/from integers, NOT indexes...), check each for equal to itself but not equal to the others, check that OS_OBJECT_ID_UNDEFINED results in undefined and the rest are defined. This also ensures an ID didn't "wrap" by exercising Array Index conversions from array index 0 and max for each type (as defined in configuration).

Describe alternatives you've considered
Could be added to a "functional/full stack" test but no point since they don't have any external dependencies.

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

Labels

enhancementunit-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