tests: logging/dictionary: update test for combined strings
Compilers often combine strings to conserve space, if one string is a perfect substring of another one towards the end. So add another string in the test to make sure dictionary logging is still working correctly under this scenario. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
8610f9f019
commit
2e859368bd
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ void main(void)
|
||||||
uint64_t u64 = 65;
|
uint64_t u64 = 65;
|
||||||
char c = '!';
|
char c = '!';
|
||||||
char *s = "static str";
|
char *s = "static str";
|
||||||
|
char *s1 = "c str";
|
||||||
char vs0[32];
|
char vs0[32];
|
||||||
char vs1[32];
|
char vs1[32];
|
||||||
void *p = s;
|
void *p = s;
|
||||||
|
@ -49,7 +50,7 @@ void main(void)
|
||||||
snprintk(&vs1[0], sizeof(vs1), "%s", "another dynamic str");
|
snprintk(&vs1[0], sizeof(vs1), "%s", "another dynamic str");
|
||||||
|
|
||||||
LOG_DBG("char %c", c);
|
LOG_DBG("char %c", c);
|
||||||
LOG_DBG("s str %s", s);
|
LOG_DBG("s str %s %s", s, s1);
|
||||||
LOG_DBG("d str %s", vs0);
|
LOG_DBG("d str %s", vs0);
|
||||||
LOG_DBG("mixed str %s %s %s %s %s %s %s", vs0, "---", vs0, "---", vs1, "---", vs1);
|
LOG_DBG("mixed str %s %s %s %s %s %s %s", vs0, "---", vs0, "---", vs1, "---", vs1);
|
||||||
LOG_DBG("mixed c/s %c %s %s %s %c", c, s, vs0, s, c);
|
LOG_DBG("mixed c/s %c %s %s %s %c", c, s, vs0, s, c);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue