Changeset 29783 in vbox
- Timestamp:
- May 25, 2010 1:13:35 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strformat.cpp
r29683 r29783 273 273 */ 274 274 while (--cchPrecision >= cchValue) 275 *psz++ = ' 275 *psz++ = '0'; 276 276 277 277 /* … … 352 352 * @param InArgs Argument list. 353 353 */ 354 RTDECL(size_t) RTStrFormatV(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRFORMAT pfnFormat, void *pvArgFormat, 354 RTDECL(size_t) RTStrFormatV(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRFORMAT pfnFormat, void *pvArgFormat, 355 355 const char *pszFormat, va_list InArgs) 356 356 { -
trunk/src/VBox/Runtime/testcase/tstRTStrFormat.cpp
r29683 r29783 434 434 CHECK42("%4RU32", (uint32_t)42, " 42"); 435 435 CHECK42("%04RU32", (uint32_t)42, "0042"); 436 CHECK42("%.4RU32", (uint32_t)42, "0042"); 436 437 437 438 CHECK42("%RU64", (uint64_t)112345987345ULL, "112345987345"); … … 439 440 CHECK42("%14RU64", (uint64_t)4, " 4"); 440 441 CHECK42("%014RU64", (uint64_t)4, "00000000000004"); 442 CHECK42("%.14RU64", (uint64_t)4, "00000000000004"); 441 443 442 444 CHECK42("%RU8", (uint8_t)1, "1"); … … 454 456 CHECK42("%5RX64", UINT64_C(0x42), " 42"); 455 457 CHECK42("%05RX64", UINT64_C(0x42), "00042"); 456 CHECK42("%.5RX64", UINT64_C(0x42), " 457 CHECK42("%.05RX64", UINT64_C(0x42), " 42");458 CHECK42("%.5RX64", UINT64_C(0x42), "00042"); 459 CHECK42("%.05RX64", UINT64_C(0x42), "00042"); /* '0' is ignored */ 458 460 459 461 CHECK42("%RX8", (uint8_t)1, "1");
Note:
See TracChangeset
for help on using the changeset viewer.