VirtualBox

Changeset 74158 in vbox for trunk/src


Ignore:
Timestamp:
Sep 9, 2018 1:18:35 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/strformat: Fixed bug formatting INT64_MAX. Cleaned up the integer formatting code to get rid of anachronisms (VAC308). [more tests]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTStrFormat.cpp

    r74157 r74158  
    320320    CHECK42("%RI32", INT32_MAX, "2147483647");
    321321    CHECK42("%RI32", INT32_MIN, "-2147483648");
     322    CHECK42("%RI32", INT32_MIN-1, "-2147483647");
     323    CHECK42("%RI32", INT32_MIN-2, "-2147483646");
    322324
    323325    CHECK42("%RI64", (int64_t)112345987345LL, "112345987345");
     
    325327    CHECK42("%RI64", INT64_MAX, "9223372036854775807");
    326328    CHECK42("%RI64", INT64_MIN, "-9223372036854775808");
     329    CHECK42("%RI64", INT64_MIN-1, "-9223372036854775807");
     330    CHECK42("%RI64", INT64_MIN-2, "-9223372036854775806");
    327331
    328332    CHECK42("%RI8", (int8_t)1, "1");
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