diff --git a/README.md b/README.md index 50f89a8..34e155f 100644 --- a/README.md +++ b/README.md @@ -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 and + ### Development Build: v1.2.0-rc1+dev30 - Replace <> with " for local includes diff --git a/fsw/src/sample_lib_version.h b/fsw/src/sample_lib_version.h index 47296d1..766b4e5 100644 --- a/fsw/src/sample_lib_version.h +++ b/fsw/src/sample_lib_version.h @@ -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 */ diff --git a/unit-test/coveragetest/coveragetest_sample_lib.c b/unit-test/coveragetest/coveragetest_sample_lib.c index 08d0a28..4c8030d 100644 --- a/unit-test/coveragetest/coveragetest_sample_lib.c +++ b/unit-test/coveragetest/coveragetest_sample_lib.c @@ -68,7 +68,8 @@ 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 @@ -76,7 +77,7 @@ static int32 UT_printf_hook(void *UserObj, int32 StubRetcode, uint32 CallCount, * 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;