VirtualBox

Ignore:
Timestamp:
Oct 29, 2010 2:58:02 PM (14 years ago)
Author:
vboxsync
Message:

now it's right. added tests to prove it.

File:
1 edited

Legend:

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

    r33610 r33615  
    111111
    112112    CHECK(iprt::MiniString("abc") <  iprt::MiniString("def"));
     113    CHECK(iprt::MiniString("") <  iprt::MiniString("def"));
     114    CHECK(iprt::MiniString("abc") > iprt::MiniString(""));
    113115    CHECK(iprt::MiniString("abc") != iprt::MiniString("def"));
    114116    CHECK_DUMP_I(iprt::MiniString("def") > iprt::MiniString("abc"));
    115117    CHECK(iprt::MiniString("abc") == iprt::MiniString("abc"));
     118    CHECK(iprt::MiniString("").compare("") == 0);
     119    CHECK(iprt::MiniString("").compare(NULL) == 0);
     120    CHECK(iprt::MiniString("").compare("a") < 0);
     121    CHECK(iprt::MiniString("a").compare("") > 0);
     122    CHECK(iprt::MiniString("a").compare(NULL) > 0);
    116123
    117124    CHECK(iprt::MiniString("abc") <  "def");
     
    127134    CHECK(!iprt::MiniString("abc").equalsIgnoreCase("dBC"));
    128135    CHECK(iprt::MiniString("").equals(""));
     136    CHECK(iprt::MiniString("").equals(NULL));
     137    CHECK(!iprt::MiniString("").equals("a"));
     138    CHECK(!iprt::MiniString("a").equals(""));
     139    CHECK(!iprt::MiniString("a").equals(NULL));
    129140    CHECK(iprt::MiniString("").equalsIgnoreCase(""));
     141    CHECK(iprt::MiniString("").equalsIgnoreCase(NULL));
     142    CHECK(!iprt::MiniString("").equalsIgnoreCase("a"));
     143    CHECK(!iprt::MiniString("a").equalsIgnoreCase(""));
    130144
    131145    copy2.setNull();
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