VirtualBox

Changeset 37966 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 14, 2011 1:39:15 PM (13 years ago)
Author:
vboxsync
Message:

testcase+fixes

Location:
trunk/src/VBox/Runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/strformatrt.cpp

    r37965 r37966  
    10341034        { \
    10351035            cchOutput += pfnOutput(pvArgOutput, !cPrinted ? "{unkn=" : ",unkn=", 6); \
    1036             cch = RTStrFormatNumber(&szBuf[0], (a_uVal), 16, 8, -1, fFlags); \
     1036            cch = RTStrFormatNumber(&szBuf[0], (a_uVal), 16, 1, -1, fFlags); \
    10371037            cchOutput += pfnOutput(pvArgOutput, szBuf, cch); \
    10381038            cPrinted++; \
     
    10581058                        uint64_t cr0 = va_arg(*pArgs, uint64_t);
    10591059                        fFlags |= RTSTR_F_64BIT;
    1060                         cch = RTStrFormatNumber(&szBuf[0], cr0, 16, 8, -1, fFlags);
     1060                        cch = RTStrFormatNumber(&szBuf[0], cr0, 16, 8, -1, fFlags | RTSTR_F_ZEROPAD);
    10611061                        cchOutput += pfnOutput(pvArgOutput, szBuf, cch);
    10621062                        REG_OUT_BIT(cr0, X86_CR0_PE, "PE");
     
    10771077                        uint64_t cr4 = va_arg(*pArgs, uint64_t);
    10781078                        fFlags |= RTSTR_F_64BIT;
    1079                         cch = RTStrFormatNumber(&szBuf[0], cr4, 16, 8, -1, fFlags);
     1079                        cch = RTStrFormatNumber(&szBuf[0], cr4, 16, 8, -1, fFlags | RTSTR_F_ZEROPAD);
    10801080                        cchOutput += pfnOutput(pvArgOutput, szBuf, cch);
    10811081                        REG_OUT_BIT(cr4, X86_CR4_VME, "VME");
  • trunk/src/VBox/Runtime/testcase/tstRTStrFormat.cpp

    r37965 r37966  
    593593     */
    594594    RTTestSub(hTest, "x86 register format types (%RAx86[*])");
    595     CHECK42("%'RU64", _1E, "1 152 921 504 606 846 976");
    596595    CHECK42("%RAx86[cr0]", UINT64_C(0x80000011),    "80000011{PE,ET,PG}");
     596    CHECK42("%RAx86[cr0]", UINT64_C(0x80000001),    "80000001{PE,PG}");
     597    CHECK42("%RAx86[cr0]", UINT64_C(0x00000001),    "00000001{PE}");
     598    CHECK42("%RAx86[cr0]", UINT64_C(0x80000000),    "80000000{PG}");
    597599    CHECK42("%RAx86[cr4]", UINT64_C(0x80000001),    "80000001{VME,unkn=80000000}");
    598600    CHECK42("%#RAx86[cr4]", UINT64_C(0x80000001),    "0x80000001{VME,unkn=0x80000000}");
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette