Changeset 33610 in vbox for trunk/src/VBox/Runtime/testcase/tstIprtMiniString.cpp
- Timestamp:
- Oct 29, 2010 2:42:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstIprtMiniString.cpp
r33605 r33610 37 37 38 38 39 static void test1Hlp1(const char *pszExpect, const char *pszFormat, ...) 40 { 41 va_list va; 42 va_start(va, pszFormat); 43 iprt::MiniString strTst(pszFormat, va); 44 va_end(va); 45 RTTESTI_CHECK_MSG(strTst.equals(pszExpect), ("strTst='%s' expected='%s'\n", strTst.c_str(), pszExpect)); 46 } 39 47 40 48 static void test1(RTTEST hTest) … … 118 126 CHECK(iprt::MiniString("abc").equalsIgnoreCase("ABC")); 119 127 CHECK(!iprt::MiniString("abc").equalsIgnoreCase("dBC")); 128 CHECK(iprt::MiniString("").equals("")); 129 CHECK(iprt::MiniString("").equalsIgnoreCase("")); 120 130 121 131 copy2.setNull(); … … 138 148 iprt::MiniString StrFmt; 139 149 CHECK(StrFmt.printf("%s-%s-%d", "abc", "def", 42).equals("abc-def-42")); 150 test1Hlp1("abc-42-def", "%s-%d-%s", "abc", 42, "def"); 151 test1Hlp1("", ""); 152 test1Hlp1("1", "1"); 153 test1Hlp1("foobar", "%s", "foobar"); 140 154 141 155 #undef CHECK
Note:
See TracChangeset
for help on using the changeset viewer.