VirtualBox

Changeset 14008 in vbox


Ignore:
Timestamp:
Nov 10, 2008 1:12:33 PM (16 years ago)
Author:
vboxsync
Message:

tstUtf8: some more RTStrNICmp tests.

File:
1 edited

Legend:

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

    r13927 r14008  
    805805void TstRTStrXCmp(void)
    806806{
    807     RTPrintf("tstUtf8: TESTING RTStr*Cmp\n");
     807    RTPrintf("tstUtf8: TEST 4 - RTStr*Cmp\n");
    808808#define CHECK_DIFF(expr, op) \
    809809    do \
     
    859859    CHECK_DIFF(RTStrICmp("abcdef", "abcdeg"), < );
    860860
    861     CHECK_DIFF(RTStrICmp("abcdeF", "abcdef"), == );
     861    CHECK_DIFF(RTStrICmp("abcdeF", "abcdef"), ==);
    862862    CHECK_DIFF(RTStrICmp("abcdef", "abcdeF"), ==);
    863863    CHECK_DIFF(RTStrICmp("ABCDEF", "abcdef"), ==);
     
    873873    CHECK_DIFF(RTStrNICmp("", NULL, RTSTR_MAX), > );
    874874    CHECK_DIFF(RTStrNICmp("", "", RTSTR_MAX), == );
     875    CHECK_DIFF(RTStrNICmp(NULL, NULL, 0), == );
     876    CHECK_DIFF(RTStrNICmp(NULL, "", 0), == );
     877    CHECK_DIFF(RTStrNICmp("", NULL, 0), == );
     878    CHECK_DIFF(RTStrNICmp("", "", 0), == );
    875879    CHECK_DIFF(RTStrNICmp("abcdef", "abcdef", RTSTR_MAX), == );
    876880    CHECK_DIFF(RTStrNICmp("abcdef", "abcde", RTSTR_MAX), > );
     
    879883    CHECK_DIFF(RTStrNICmp("abcdef", "abcdeg", RTSTR_MAX), < );
    880884
    881     CHECK_DIFF(RTStrNICmp("abcdeF", "abcdef", RTSTR_MAX), == );
     885    CHECK_DIFF(RTStrNICmp("abcdeF", "abcdef", RTSTR_MAX), ==);
    882886    CHECK_DIFF(RTStrNICmp("abcdef", "abcdeF", RTSTR_MAX), ==);
    883887    CHECK_DIFF(RTStrNICmp("ABCDEF", "abcdef", RTSTR_MAX), ==);
     
    889893    CHECK_DIFF(RTStrNICmp("ABCDEF", "fedcba", 0), ==);
    890894    CHECK_DIFF(RTStrNICmp("AbCdEg", "aBcDeF", 5), ==);
     895    CHECK_DIFF(RTStrNICmp("AbCdEf", "aBcDeF", 5), ==);
     896    CHECK_DIFF(RTStrNICmp("AbCdE",  "aBcDe", 5), ==);
     897    CHECK_DIFF(RTStrNICmp("AbCdE",  "aBcDeF", 5), ==);
     898    CHECK_DIFF(RTStrNICmp("AbCdEf", "aBcDe", 5), ==);
    891899    CHECK_DIFF(RTStrNICmp("AbCdEg", "aBcDeF", 6), > );
    892900    CHECK_DIFF(RTStrNICmp("AbCdEG", "aBcDef", 6), > ); /* diff performed on the lower case cp. */
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