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

Fix #502, Add extra assert macros #503

Merged

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Add the following macros for UT assert:

UtAssert_INT32_EQ - check equality as 32 bit signed int
UtAssert_UINT32_EQ - check equality as 32 bit unsigned int
UtAssert_NOT_NULL - check pointer not null
UtAssert_NULL - check pointer is null
UtAssert_NONZERO - check integer is nonzero
UtAssert_ZERO - check integer is zero
UtAssert_STUB_COUNT - check stub count

These are all just wrappers around UtAssert_True for commonly-used asserts. The description message is auto generated so it is consistent.

Fixes #502

Testing performed
Build and run all existing unit tests.
Also test with new PSP coverage tests that use the new macros and confirm they work as described.

Expected behavior changes
No impact to current behavior. These are just new macros for new test case, to improve ease of use and consistency for future testing.

System(s) tested on
Ubuntu 20.04

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Add the following macros for UT assert:

UtAssert_INT32_EQ - check equality as 32 bit signed int
UtAssert_UINT32_EQ - check equality as 32 bit unsigned int
UtAssert_NOT_NULL - check pointer not null
UtAssert_NULL - check pointer is null
UtAssert_NONZERO - check integer is nonzero
UtAssert_ZERO - check integer is zero
UtAssert_STUB_COUNT - check stub count

These are all just wrappers around UtAssert_True for
commonly-used asserts.  The description message is
auto generated so it is consistent.
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Jun 16, 2020
@astrogeco
Copy link
Contributor

CCB 2020-06-17: APPROVED and FastTracked

@astrogeco astrogeco added IC-20200610 and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Jun 17, 2020
@astrogeco astrogeco changed the base branch from master to integration-candidate June 17, 2020 21:11
@astrogeco astrogeco merged commit 3cc506c into nasa:integration-candidate Jun 17, 2020
astrogeco pushed a commit to nasa/cFS that referenced this pull request Jun 17, 2020
@astrogeco astrogeco added the CCB:Approved Indicates code review and approval by community CCB label Jun 17, 2020
astrogeco pushed a commit to nasa/cFS that referenced this pull request Jun 17, 2020
@jphickey jphickey deleted the fix-502-utassert-macros branch June 19, 2020 16:13
@skliper skliper added this to the 5.1.0 milestone Aug 21, 2020
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add int32 UT assert macro
3 participants