Skip to content

Commit

Permalink
Merge pull request #61 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
sample_lib Integration candidate: 2021-04-27
  • Loading branch information
astrogeco authored Apr 29, 2021
2 parents 1b9eea3 + a571b06 commit 12c82b5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ sample_lib implements SAMPLE_Function, as an example for how to build and link a

## Version History

### Development Build: v1.2.0-rc1+dev34

- Replace direct ref to ArgPtr with `UT_Hook_GetArgValueByName` macro. Reading the pointer directly is not advised.
- See <https://github.com/nasa/sample_lib/pull/61> and <https://github.com/nasa/cFS/pull/250>

### Development Build: v1.2.0-rc1+dev30

- Replace <> with " for local includes
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/sample_lib_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/* Development Build Macro Definitions */

#define SAMPLE_LIB_BUILD_NUMBER 30 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_LIB_BUILD_NUMBER 34 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_LIB_BUILD_BASELINE \
"v1.2.0-rc1" /*!< Development Build: git tag that is the base for the current development */

Expand Down
5 changes: 3 additions & 2 deletions unit-test/coveragetest/coveragetest_sample_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,16 @@ typedef struct
static int32 UT_printf_hook(void *UserObj, int32 StubRetcode, uint32 CallCount, const UT_StubContext_t *Context,
va_list va)
{
SAMPLE_LIB_Function_TestState_t *State = UserObj;
SAMPLE_LIB_Function_TestState_t *State = UserObj;
const char * string = UT_Hook_GetArgValueByName(Context, "string", const char *);

/*
* The OS_printf() stub passes format string as the argument
* This confirms the whole string; normally this level of test
* detail would not be needed, but this serves as an example
* of how it can be done.
*/
if (Context->ArgCount > 0 && strcmp(Context->ArgPtr[0], "SAMPLE_LIB_Function called, buffer=\'%s\'\n") == 0)
if (Context->ArgCount > 0 && strcmp(string, "SAMPLE_LIB_Function called, buffer=\'%s\'\n") == 0)
{
State->format_string_valid = true;

Expand Down

0 comments on commit 12c82b5

Please sign in to comment.