Skip to content

Commit d334c5e

Browse files
linguini1xiaoxiang781216
authored andcommitted
apps/unity: Add printf configuration
Allows the user to select whether or not they want access to the Unity ``TEST_PRINTF`` commands. Signed-off-by: Matteo Golin <[email protected]>
1 parent 8f3c3c5 commit d334c5e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

include/testing/unity_config.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,10 @@
4747
# define UNITY_OUTPUT_COLOR 1
4848
#endif
4949

50+
/* Enable Unity TEST_PRINTF */
51+
52+
#ifdef CONFIG_TESTING_UNITY_PRINT_FORMATTED
53+
# define UNITY_INCLUDE_PRINT_FORMATTED 1
54+
#endif
55+
5056
#endif /* UNITY_CONFIG_H */

testing/unity/Kconfig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ config TESTING_UNITY_OUTPUT_COLOR
2929
bool "Output color"
3030
default n
3131
---help---
32-
Select this if your want to add some colors to your tests
32+
Select this if you want to add some colors to your tests
33+
34+
config TESTING_UNITY_PRINT_FORMATTED
35+
bool "Unity printf"
36+
default y
37+
---help---
38+
Select this if you you want to use the Unity TEST_PRINTF macro.
3339

3440
endif # TESTING_UNITY

0 commit comments

Comments
 (0)