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

CF tests assume "assert" is available but do not include assert.h #52

Closed
jphickey opened this issue Nov 23, 2021 · 0 comments · Fixed by #82
Closed

CF tests assume "assert" is available but do not include assert.h #52

jphickey opened this issue Nov 23, 2021 · 0 comments · Fixed by #82

Comments

@jphickey
Copy link
Contributor

This issue was imported from the GSFC issue tracking system

Imported from: [GSFCCFS-1788] CF tests assume "assert" is available but do not include assert.h
Originally submitted by: Hickey, Joseph P. (GSFC-582.0)[VANTAGE SYSTEMS INC] on Tue Nov 16 18:48:45 2021

Original Description:
Some CF test utility functions call "assert" on various items (e.g. Any_file_directive_t_Except).

Several issues with this:

  • The "assert.h" system header was not included
  • The condition "ERROR_RETRIEVING_ANY_VALUE" is a constant that is not even 0, so the assert will generally pass (it is boolean true).

Recommendation is to use the UtAssert_Abort() function instead.

jphickey added a commit to jphickey/CF that referenced this issue Nov 23, 2021
Instead of using the system assert call, use UtAssert_Abort() to report
critical conditions where continuation is not possible.

Note due to limitations of the UtAssert_Abort() function, this uses
UtAssert_Failed() to report any runtime information, followed by
abort with a static/fixed message.
jphickey added a commit to jphickey/CF that referenced this issue Dec 1, 2021
Instead of using the system assert call, use UtAssert_Abort() to report
critical conditions where continuation is not possible.

Note due to limitations of the UtAssert_Abort() function, this uses
UtAssert_Failed() to report any runtime information, followed by
abort with a static/fixed message.
@astrogeco astrogeco added the bug label Dec 6, 2021
astrogeco added a commit that referenced this issue Dec 8, 2021
Fix #52, do not use system assert in tests
@skliper skliper added this to the Draco milestone Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants