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

Cannot find recommended method (UtMemSet) suggested in comments #963

Closed
asgibson opened this issue Apr 15, 2021 · 0 comments · Fixed by #974 or #996
Closed

Cannot find recommended method (UtMemSet) suggested in comments #963

asgibson opened this issue Apr 15, 2021 · 0 comments · Fixed by #974 or #996
Assignees
Labels
docs refactor unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@asgibson
Copy link
Contributor

Describe the bug
UtMemSet is not found in ut-assert, but it suggested to be used in comments from utassert.h and uttools.h

To Reproduce

/* Compares a region of memory to a static pattern and determines if they are equal. Note: Use UtMemSet to
* fill a region of memory with a static pattern. */
#define UtAssert_MemCmpValue(Memory, Value, Length, ...) \
UtAssertEx((UtMemCmpValue(Memory, Value, Length)), UtAssert_GetContext(), __FILE__, __LINE__, __VA_ARGS__)

/* Compares a region of memory to a static pattern and determines if they are equal. Note: Use UtMemSet to
* fill a region of memory with a static pattern. */
bool UtMemCmpValue(const void *Memory, uint8 Value, uint32 Length);

Additional context
Other comments in the same files suggest to use methods that do exist, UtMemFill and UtMem2BinFile.

Reporter Info
Alan Gibson
NASA/GSFC 587

@asgibson asgibson added unit-test Tickets related to the OSAL unit testing (functional and/or coverage) refactor labels Apr 15, 2021
jphickey added a commit to jphickey/osal that referenced this issue Apr 27, 2021
The UtAssert API documentation was very terse and some references
are obsolete/incorrect.  This converts to doxygen form and
corrects the stale/incorrect references.

In particular - UtMemSet does not exist, but the standard C memset
call should be used to fill a memory region with a constant value.
@jphickey jphickey self-assigned this Apr 27, 2021
@skliper skliper added this to the 6.0.0 milestone Apr 27, 2021
@astrogeco astrogeco added the docs label May 3, 2021
astrogeco added a commit that referenced this issue May 11, 2021
Fix #963, improve documentation of UtAssert API calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs refactor unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
4 participants