Skip to content

Commit

Permalink
Updated documentation and examples to reflect the TEST_PRINTF function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jvcdk committed Feb 14, 2020
1 parent 3da0b46 commit 22a047e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions docs/UnityConfigurationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,18 +282,18 @@ _Example:_
#define UNITY_INCLUDE_PRINT_FORMATTED
int a = 0xfab1;
UnityPrintFormatted("Decimal %d\n", -7);
UnityPrintFormatted("Unsigned %u\n", 987);
UnityPrintFormatted("Float %f\n", 3.1415926535897932384);
UnityPrintFormatted("Binary %b\n", 0xA);
UnityPrintFormatted("Hex %X\n", 0xFAB);
UnityPrintFormatted("Pointer %p\n", &a);
UnityPrintFormatted("Character %c\n", 'F');
UnityPrintFormatted("String %s\n", "My string");
UnityPrintFormatted("Percent %%\n");
UnityPrintFormatted("Color Red \033[41mFAIL\033[00m\n");
UnityPrintFormatted("\n");
UnityPrintFormatted("Multiple (%d) (%i) (%u) (%x)\n", -100, 0, 200, 0x12345);
TEST_PRINTF("Decimal %d\n", -7);
TEST_PRINTF("Unsigned %u\n", 987);
TEST_PRINTF("Float %f\n", 3.1415926535897932384);
TEST_PRINTF("Binary %b\n", 0xA);
TEST_PRINTF("Hex %X\n", 0xFAB);
TEST_PRINTF("Pointer %p\n", &a);
TEST_PRINTF("Character %c\n", 'F');
TEST_PRINTF("String %s\n", "My string");
TEST_PRINTF("Percent %%\n");
TEST_PRINTF("Color Red \033[41mFAIL\033[00m\n");
TEST_PRINTF("\n");
TEST_PRINTF("Multiple (%d) (%i) (%u) (%x)\n", -100, 0, 200, 0x12345);
```
Expand Down
4 changes: 2 additions & 2 deletions examples/unity_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@
*/
/* #define UNITY_EXCLUDE_STDDEF_H */

/* Define this to enable the unity formatted print function:
* "UnityPrintFormatted"
/* Define this to enable the unity formatted print macro:
* "TEST_PRINTF"
*/
/* #define UNITY_INCLUDE_PRINT_FORMATTED */

Expand Down

0 comments on commit 22a047e

Please sign in to comment.