Skip to content

Commit 12c82b5

Browse files
authored
Merge pull request #61 from nasa/integration-candidate
sample_lib Integration candidate: 2021-04-27
2 parents 1b9eea3 + a571b06 commit 12c82b5

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ sample_lib implements SAMPLE_Function, as an example for how to build and link a
1111

1212
## Version History
1313

14+
### Development Build: v1.2.0-rc1+dev34
15+
16+
- Replace direct ref to ArgPtr with `UT_Hook_GetArgValueByName` macro. Reading the pointer directly is not advised.
17+
- See <https://github.com/nasa/sample_lib/pull/61> and <https://github.com/nasa/cFS/pull/250>
18+
1419
### Development Build: v1.2.0-rc1+dev30
1520

1621
- Replace <> with " for local includes

fsw/src/sample_lib_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
/* Development Build Macro Definitions */
3434

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

unit-test/coveragetest/coveragetest_sample_lib.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,16 @@ typedef struct
6868
static int32 UT_printf_hook(void *UserObj, int32 StubRetcode, uint32 CallCount, const UT_StubContext_t *Context,
6969
va_list va)
7070
{
71-
SAMPLE_LIB_Function_TestState_t *State = UserObj;
71+
SAMPLE_LIB_Function_TestState_t *State = UserObj;
72+
const char * string = UT_Hook_GetArgValueByName(Context, "string", const char *);
7273

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

0 commit comments

Comments
 (0)