Skip to content

Commit 0bc3bee

Browse files
nordic-krchgalak
authored andcommitted
tests: lib: cbprintf_package: Add CBPRINTF_MUST_RUNTIME_PACKAGE test
Extended test to cover CBPRINTF_MUST_RUNTIME_PACKAGE macro. Signed-off-by: Krzysztof Chruscinski <[email protected]>
1 parent 604c9ac commit 0bc3bee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/lib/cbprintf_package/src/test.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ static void unpack(const char *desc, struct out_buffer *buf,
5757
}
5858

5959
#define TEST_PACKAGING(fmt, ...) do { \
60-
snprintf(compare_buf, sizeof(compare_buf), fmt, __VA_ARGS__); \
60+
int must_runtime = CBPRINTF_MUST_RUNTIME_PACKAGE(0, fmt, __VA_ARGS__); \
61+
zassert_equal(must_runtime, !Z_C_GENERIC, NULL); \
62+
snprintfcb(compare_buf, sizeof(compare_buf), fmt, __VA_ARGS__); \
6163
printk("-----------------------------------------\n"); \
6264
printk("%s\n", compare_buf); \
6365
uint8_t *pkg; \

0 commit comments

Comments
 (0)