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

Migrate CFE generic integer assert tests to common UT Assert #1124

Closed
jphickey opened this issue Jul 30, 2021 · 0 comments · Fixed by #1125 or #1126
Closed

Migrate CFE generic integer assert tests to common UT Assert #1124

jphickey opened this issue Jul 30, 2021 · 0 comments · Fixed by #1125 or #1126
Assignees
Labels
enhancement unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Recently CFE added a number of useful generic test assertion macros, for greater than / less than, booleans, and other commonly needed checks in the CFE coverage test.

It would be nice to use these same assertions in the functional test too, and perhaps other app/lib tests, since they are pretty generic.

Describe the solution you'd like
Migrate the code from CFE coverage test-specific area into general UT Assert to be usable in the full range of test environments.

Currently the macros and code are in https://github.com/nasa/cFE/tree/main/modules/core_private/ut-stubs, thus private to CFE "coverage" test environment.

Describe alternatives you've considered
Could copy the macros and functions into cfe_assert so it can be used in functional tests, but then there would be two copies, and it would still be limited to CFE (no app/lib tests could use).

Additional context
Putting them into UT assert itself allows for the single/common implementation for both coverage and functional and any other app/lib test.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Jul 30, 2021
jphickey added a commit to jphickey/osal that referenced this issue Jul 30, 2021
Migrates some of the assert extensions that were added for CFE
coverage testing to the UtAssert level, so they can be used
in a wider scope of tests, not just CFE coverage.

The existing macros (e.g. UtAssert_INT32_EQ) are updated to
use the same facility.

All macros are now also a single line and return the boolean
pass/fail status, which was a useful feature of the CFE macros.
@skliper skliper added this to the 6.0.0 milestone Jul 30, 2021
@skliper skliper added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Jul 30, 2021
jphickey added a commit to jphickey/osal that referenced this issue Jul 30, 2021
Migrates some of the assert extensions that were added for CFE
coverage testing to the UtAssert level, so they can be used
in a wider scope of tests, not just CFE coverage.

The existing macros (e.g. UtAssert_INT32_EQ) are updated to
use the same facility.

All macros are now also a single line and return the boolean
pass/fail status, which was a useful feature of the CFE macros.
jphickey added a commit to jphickey/osal that referenced this issue Aug 2, 2021
Migrates some of the assert extensions that were added for CFE
coverage testing to the UtAssert level, so they can be used
in a wider scope of tests, not just CFE coverage.

The existing macros (e.g. UtAssert_INT32_EQ) are updated to
use the same facility.

All macros are now also a single line and return the boolean
pass/fail status, which was a useful feature of the CFE macros.
jphickey added a commit to jphickey/osal that referenced this issue Aug 2, 2021
Migrates some of the assert extensions that were added for CFE
coverage testing to the UtAssert level, so they can be used
in a wider scope of tests, not just CFE coverage.

The existing macros (e.g. UtAssert_INT32_EQ) are updated to
use the same facility.

All macros are now also a single line and return the boolean
pass/fail status, which was a useful feature of the CFE macros.
jphickey added a commit to jphickey/osal that referenced this issue Aug 2, 2021
Migrates some of the assert extensions that were added for CFE
coverage testing to the UtAssert level, so they can be used
in a wider scope of tests, not just CFE coverage.

The existing macros (e.g. UtAssert_INT32_EQ) are updated to
use the same facility.

All macros are now also a single line and return the boolean
pass/fail status, which was a useful feature of the CFE macros.
jphickey added a commit to jphickey/osal that referenced this issue Aug 2, 2021
Migrates some of the assert extensions that were added for CFE
coverage testing to the UtAssert level, so they can be used
in a wider scope of tests, not just CFE coverage.

The existing macros (e.g. UtAssert_INT32_EQ) are updated to
use the same facility.

All macros are now also a single line and return the boolean
pass/fail status, which was a useful feature of the CFE macros.
astrogeco added a commit that referenced this issue Aug 3, 2021
Fix #1124, add generic asserts from CFE coverage testing
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Fix nasa#1036, Clear task data in EarlyInit and standardize name nasa#1124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
2 participants