- Timestamp:
- Nov 6, 2010 2:47:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstIprtMiniString.cpp
r33615 r33819 167 167 test1Hlp1("foobar", "%s", "foobar"); 168 168 169 /* special constructor and assignment arguments */ 170 iprt::MiniString StrCtor1(""); 171 RTTESTI_CHECK(StrCtor1.isEmpty()); 172 RTTESTI_CHECK(StrCtor1.length() == 0); 173 174 iprt::MiniString StrCtor2(NULL); 175 RTTESTI_CHECK(StrCtor2.isEmpty()); 176 RTTESTI_CHECK(StrCtor2.length() == 0); 177 178 iprt::MiniString StrCtor1d(StrCtor1); 179 RTTESTI_CHECK(StrCtor1d.isEmpty()); 180 RTTESTI_CHECK(StrCtor1d.length() == 0); 181 182 iprt::MiniString StrCtor2d(StrCtor2); 183 RTTESTI_CHECK(StrCtor2d.isEmpty()); 184 RTTESTI_CHECK(StrCtor2d.length() == 0); 185 186 for (unsigned i = 0; i < 2; i++) 187 { 188 iprt::MiniString StrAssign; 189 if (i) StrAssign = "abcdef"; 190 StrAssign = (char *)NULL; 191 RTTESTI_CHECK(StrAssign.isEmpty()); 192 RTTESTI_CHECK(StrAssign.length() == 0); 193 194 if (i) StrAssign = "abcdef"; 195 StrAssign = ""; 196 RTTESTI_CHECK(StrAssign.isEmpty()); 197 RTTESTI_CHECK(StrAssign.length() == 0); 198 199 if (i) StrAssign = "abcdef"; 200 StrAssign = StrCtor1; 201 RTTESTI_CHECK(StrAssign.isEmpty()); 202 RTTESTI_CHECK(StrAssign.length() == 0); 203 204 if (i) StrAssign = "abcdef"; 205 StrAssign = StrCtor2; 206 RTTESTI_CHECK(StrAssign.isEmpty()); 207 RTTESTI_CHECK(StrAssign.length() == 0); 208 } 209 169 210 #undef CHECK 170 211 #undef CHECK_DUMP
Note:
See TracChangeset
for help on using the changeset viewer.