Changeset 09ab0a9a in mainline for uspace/lib/c/test/sprintf.c
- Timestamp:
- 2018-09-13T12:05:53Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cc74cb5
- Parents:
- b2aaaa0
- git-author:
- Jiri Svoboda <jiri@…> (2018-09-13 07:09:46)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-09-13 12:05:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/test/sprintf.c
rb2aaaa0 r09ab0a9a 35 35 #define TF(expected, format, ...) TEQ(expected, fmt(format, ##__VA_ARGS__)) 36 36 37 38 37 #define SPRINTF_TEST(test_name, expected_string, actual_format, ...) \ 39 38 PCUT_TEST(test_name) { \ … … 53 52 } 54 53 55 56 57 54 SPRINTF_TEST(no_formatting, "This is a test.", "This is a test."); 58 59 60 55 61 56 SPRINTF_TEST(string_plain, "some text", "%s", "some text"); … … 69 64 SPRINTF_TEST(string_pad_but_cut, " very lon", "%10.8s", "very long text"); 70 65 71 72 73 66 SPRINTF_TEST(char_basic, "[a]", "[%c]", 'a'); 74 75 76 67 77 68 SPRINTF_TEST(int_various_padding, "[1] [ 02] [03 ] [004] [005]", … … 92 83 17, 18, 19, 20, 21); 93 84 94 95 96 97 85 PCUT_EXPORT(sprintf);
Note:
See TracChangeset
for help on using the changeset viewer.