Changeset 7418 in vbox for trunk/src/VBox/Runtime/testcase
- Timestamp:
- Mar 10, 2008 4:01:58 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28852
- Location:
- trunk/src/VBox/Runtime/testcase
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstDir.cpp
r5999 r7418 160 160 DirEntry.Info.ModificationTime, 161 161 DirEntry.Info.AccessTime); 162 if (fShortName && DirEntry.c ucShortName)163 RTPrintf(" %2d %lS\n", DirEntry.c ucShortName, DirEntry.uszShortName);162 if (fShortName && DirEntry.cwcShortName) 163 RTPrintf(" %2d %lS\n", DirEntry.cwcShortName, DirEntry.wszShortName); 164 164 else 165 165 RTPrintf(" %2d %s\n", DirEntry.cbName, DirEntry.szName); -
trunk/src/VBox/Runtime/testcase/tstPath.cpp
r5999 r7418 66 66 if (RT_SUCCESS(rc)) 67 67 RTPrintf("UserHome={%s}\n", szPath); 68 68 69 69 /* 70 70 * RTPathAbsEx … … 73 73 static const char *aInput[] = 74 74 { 75 // NULL, NULL, -- assertion in RTStr Utf8ToUcs275 // NULL, NULL, -- assertion in RTStrToUtf16 76 76 NULL, "/absolute/..", 77 77 NULL, "/absolute\\\\../..", -
trunk/src/VBox/Runtime/testcase/tstUtf8.cpp
r5999 r7418 50 50 * Generate a random codepoint for simple UTF-16 encoding. 51 51 */ 52 static RTUTF16 GetRandU cs2(void)52 static RTUTF16 GetRandUtf16(void) 53 53 { 54 54 RTUTF16 wc; … … 100 100 srand((unsigned)RTTimeNanoTS()); 101 101 for (int i = 0; i < 30; i++) 102 pwszRand[i] = GetRandU cs2();102 pwszRand[i] = GetRandUtf16(); 103 103 pwszRand[30] = 0; 104 104 … … 141 141 srand((unsigned)RTTimeNanoTS()); 142 142 for (int i = 0; i < 30; i++) 143 pwszRand[i] = GetRandU cs2();143 pwszRand[i] = GetRandUtf16(); 144 144 pwszRand[30] = 0; 145 145 rc = RTUtf16ToUtf8(pwszRand, &pszUtf8); … … 181 181 srand((unsigned)RTTimeNanoTS()); 182 182 for (int i = 0; i < 30; i++) 183 pwszRand[i] = GetRandU cs2();183 pwszRand[i] = GetRandUtf16(); 184 184 pwszRand[30] = 0; 185 185 … … 223 223 srand((unsigned)RTTimeNanoTS()); 224 224 for (int i = 0; i < 30; i++) 225 pwszRand[i] = GetRandU cs2();225 pwszRand[i] = GetRandUtf16(); 226 226 pwszRand[30] = 0; 227 227 … … 261 261 srand((unsigned)RTTimeNanoTS()); 262 262 for (int i = 0; i < 30; i++) 263 pwszRand[i] = GetRandU cs2();263 pwszRand[i] = GetRandUtf16(); 264 264 pwszRand[30] = 0; 265 265 … … 280 280 srand((unsigned)RTTimeNanoTS()); 281 281 for (int i = 0; i < 30; i++) 282 pwszRand[i] = GetRandU cs2();282 pwszRand[i] = GetRandUtf16(); 283 283 pwszRand[30] = 0; 284 284 … … 488 488 } 489 489 490 PRTUTF16 p uszUcs2;491 rc = RTStrToUtf16(pszUtf8, &p uszUcs2);490 PRTUTF16 pwszUtf16; 491 rc = RTStrToUtf16(pszUtf8, &pwszUtf16); 492 492 if (rc == VINF_SUCCESS) 493 493 { 494 if (mymemcmp(p uszUcs2, g_wszAll, sizeof(g_wszAll), 16))494 if (mymemcmp(pwszUtf16, g_wszAll, sizeof(g_wszAll), 16)) 495 495 { 496 496 RTPrintf("tstUtf8: FAILURE - the full #1: UTF-8 -> UTF-16 failed compare!\n"); 497 497 g_cErrors++; 498 498 } 499 RTUtf16Free(p uszUcs2);499 RTUtf16Free(pwszUtf16); 500 500 } 501 501 else … … 517 517 */ 518 518 RTPrintf("tstUtf8: #2: UTF-8 -> UTF-16 -> UTF-8...\n"); 519 PRTUTF16 p uszUcs2;520 rc = RTStrToUtf16(&g_szAll[0], &p uszUcs2);519 PRTUTF16 pwszUtf16; 520 rc = RTStrToUtf16(&g_szAll[0], &pwszUtf16); 521 521 if (rc == VINF_SUCCESS) 522 522 { 523 if (mymemcmp(p uszUcs2, g_wszAll, sizeof(g_wszAll), 16))523 if (mymemcmp(pwszUtf16, g_wszAll, sizeof(g_wszAll), 16)) 524 524 { 525 525 RTPrintf("tstUtf8: FAILURE - the full #2: UTF-8 -> UTF-16 failed compare!\n"); … … 528 528 529 529 char *pszUtf8; 530 rc = RTUtf16ToUtf8(p uszUcs2, &pszUtf8);530 rc = RTUtf16ToUtf8(pwszUtf16, &pszUtf8); 531 531 if (rc == VINF_SUCCESS) 532 532 { … … 543 543 g_cErrors++; 544 544 } 545 RT StrUcs2Free(puszUcs2);545 RTUtf16Free(pwszUtf16); 546 546 } 547 547 else
Note:
See TracChangeset
for help on using the changeset viewer.