Changeset 80565 in vbox for trunk/src/VBox/Runtime/testcase
- Timestamp:
- Sep 3, 2019 12:51:00 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133080
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTStrFormat.cpp
r80496 r80565 732 732 cch = RTStrPrintf(pszBuf, BUF_SIZE, "%256.*Rhxs", sizeof(s_abHex1), s_abHex1); 733 733 CHECKSTR("00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14"); 734 cch = RTStrPrintf(pszBuf, BUF_SIZE, "%256.*RhXs", sizeof(s_abHex1), s_abHex1, (uint64_t)0x1234); 735 CHECKSTR("00001234: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14"); 736 cch = RTStrPrintf(pszBuf, BUF_SIZE, "%256.*RhXs", sizeof(s_abHex1), s_abHex1, (uint64_t)0x987654321abcdef); 737 CHECKSTR("0987654321abcdef: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14"); 734 738 735 739 cch = RTStrPrintf(pszBuf, BUF_SIZE, "%4.8Rhxd", s_abHex1); 736 740 RTStrPrintf(pszBuf2, BUF_SIZE, 737 "%p 738 "%p 741 "%p/0000: 00 01 02 03 ....\n" 742 "%p/0004: 04 05 06 07 ....", 739 743 &s_abHex1[0], &s_abHex1[4]); 740 744 CHECKSTR(pszBuf2); … … 742 746 cch = RTStrPrintf(pszBuf, BUF_SIZE, "%4.6Rhxd", s_abHex1); 743 747 RTStrPrintf(pszBuf2, BUF_SIZE, 744 "%p 745 "%p 748 "%p/0000: 00 01 02 03 ....\n" 749 "%p/0004: 04 05 ..", 746 750 &s_abHex1[0], &s_abHex1[4]); 747 751 CHECKSTR(pszBuf2); … … 749 753 cch = RTStrPrintf(pszBuf, BUF_SIZE, "%.*Rhxd", sizeof(s_abHex1), s_abHex1); 750 754 RTStrPrintf(pszBuf2, BUF_SIZE, 751 "%p 752 "%p 755 "%p/0000: 00 01 02 03 04 05 06 07-08 09 0a 0b 0c 0d 0e 0f ................\n" 756 "%p/0010: 10 11 12 13 14 ....." 753 757 , 754 758 &s_abHex1[0], &s_abHex1[0x10]); 759 CHECKSTR(pszBuf2); 760 761 cch = RTStrPrintf(pszBuf, BUF_SIZE, "%.*RhXd", sizeof(s_abHex1), s_abHex1, (uint64_t)0xf304); 762 RTStrPrintf(pszBuf2, BUF_SIZE, 763 "0000f304/0000: 00 01 02 03 04 05 06 07-08 09 0a 0b 0c 0d 0e 0f ................\n" 764 "0000f314/0010: 10 11 12 13 14 ....."); 765 CHECKSTR(pszBuf2); 766 767 cch = RTStrPrintf(pszBuf, BUF_SIZE, "%.*RhXd", sizeof(s_abHex1), s_abHex1, (uint64_t)0x123456789abcdef); 768 RTStrPrintf(pszBuf2, BUF_SIZE, 769 "0123456789abcdef/0000: 00 01 02 03 04 05 06 07-08 09 0a 0b 0c 0d 0e 0f ................\n" 770 "0123456789abcdff/0010: 10 11 12 13 14 ....."); 755 771 CHECKSTR(pszBuf2); 756 772
Note:
See TracChangeset
for help on using the changeset viewer.