Changeset 39542 in vbox for trunk/src/VBox/HostServices/SharedFolders/testcase
- Timestamp:
- Dec 6, 2011 4:48:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp
r39540 r39542 27 27 ******************************************************************************/ 28 28 29 #include "teststubs.h"30 29 #include "tstSharedFolderService.h" 31 30 #include "vbsf.h" … … 39 38 #include <iprt/test.h> 40 39 40 #include "teststubs.h" 41 41 42 42 /****************************************************************************** … … 115 115 static PRTDIR testRTDirClosepDir; 116 116 117 RTDECL(int)testRTDirClose(PRTDIR pDir)117 extern int testRTDirClose(PRTDIR pDir) 118 118 { 119 119 /* RTPrintf("%s: pDir=%p\n", __func__, pDir); */ … … 125 125 static RTFMODE testRTDirCreateMode; 126 126 127 RTDECL(int)testRTDirCreate(const char *pszPath, RTFMODE fMode)127 extern int testRTDirCreate(const char *pszPath, RTFMODE fMode) 128 128 { 129 129 /* RTPrintf("%s: pszPath=%s, fMode=0x%llx\n", __func__, pszPath, … … 136 136 static PRTDIR testRTDirOpenpDir; 137 137 138 RTDECL(int)testRTDirOpen(PRTDIR *ppDir, const char *pszPath)138 extern int testRTDirOpen(PRTDIR *ppDir, const char *pszPath) 139 139 { 140 140 /* RTPrintf("%s: pszPath=%s\n", __func__, pszPath); */ … … 148 148 static RTTIMESPEC testRTDirQueryInfoATime; 149 149 150 RTDECL(int)testRTDirQueryInfo(PRTDIR pDir, PRTFSOBJINFO pObjInfo,150 extern int testRTDirQueryInfo(PRTDIR pDir, PRTFSOBJINFO pObjInfo, 151 151 RTFSOBJATTRADD enmAdditionalAttribs) 152 152 { … … 160 160 } 161 161 162 RTDECL(int)testRTDirRemove(const char *pszPath) { RTPrintf("%s\n", __func__); return 0; }162 extern int testRTDirRemove(const char *pszPath) { RTPrintf("%s\n", __func__); return 0; } 163 163 164 164 static PRTDIR testRTDirReadExDir; 165 165 166 RTDECL(int)testRTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry,166 extern int testRTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, 167 167 size_t *pcbDirEntry, 168 168 RTFSOBJATTRADD enmAdditionalAttribs, … … 199 199 static RTFILE testRTFileCloseFile; 200 200 201 RTDECL(int)testRTFileClose(RTFILE File)201 extern int testRTFileClose(RTFILE File) 202 202 { 203 203 /* RTPrintf("%s: File=%p\n", __func__, File); */ … … 206 206 } 207 207 208 RTDECL(int)testRTFileDelete(const char *pszFilename) { RTPrintf("%s\n", __func__); return 0; }208 extern int testRTFileDelete(const char *pszFilename) { RTPrintf("%s\n", __func__); return 0; } 209 209 210 210 static RTFILE testRTFileFlushFile; 211 211 212 RTDECL(int)testRTFileFlush(RTFILE File)212 extern int testRTFileFlush(RTFILE File) 213 213 { 214 214 /* RTPrintf("%s: File=%p\n", __func__, File); */ … … 222 222 static uint64_t testRTFileLockSize; 223 223 224 RTDECL(int)testRTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock,224 extern int testRTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, 225 225 uint64_t cbLock) 226 226 { … … 238 238 static RTFILE testRTFileOpenpFile; 239 239 240 RTDECL(int)testRTFileOpen(PRTFILE pFile, const char *pszFilename,240 extern int testRTFileOpen(PRTFILE pFile, const char *pszFilename, 241 241 uint64_t fOpen) 242 242 { … … 254 254 static uint32_t testRTFileQueryInfoFMode; 255 255 256 RTDECL(int)testRTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs)256 extern int testRTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs) 257 257 { 258 258 /* RTPrintf("%s, hFile=%p, enmAdditionalAttribs=0x%llx\n", __func__, … … 269 269 static const char *testRTFileReadData; 270 270 271 RTDECL(int)testRTFileRead(RTFILE File, void *pvBuf, size_t cbToRead,271 extern int testRTFileRead(RTFILE File, void *pvBuf, size_t cbToRead, 272 272 size_t *pcbRead) 273 273 { … … 281 281 } 282 282 283 RTDECL(int)testRTFileSeek(RTFILE hFile, int64_t offSeek, unsigned uMethod,283 extern int testRTFileSeek(RTFILE hFile, int64_t offSeek, unsigned uMethod, 284 284 uint64_t *poffActual) 285 285 { … … 293 293 static uint64_t testRTFileSetFMode; 294 294 295 RTDECL(int)testRTFileSetMode(RTFILE File, RTFMODE fMode)295 extern int testRTFileSetMode(RTFILE File, RTFMODE fMode) 296 296 { 297 297 /* RTPrintf("%s: fMode=%llu\n", __func__, LLUIFY(fMode)); */ … … 303 303 static RTFOFF testRTFileSetSizeSize; 304 304 305 RTDECL(int)testRTFileSetSize(RTFILE File, uint64_t cbSize)305 extern int testRTFileSetSize(RTFILE File, uint64_t cbSize) 306 306 { 307 307 /* RTPrintf("%s: File=%llu, cbSize=%llu\n", __func__, LLUIFY(File), … … 314 314 static RTTIMESPEC testRTFileSetTimesATime; 315 315 316 RTDECL(int)testRTFileSetTimes(RTFILE File, PCRTTIMESPEC pAccessTime,316 extern int testRTFileSetTimes(RTFILE File, PCRTTIMESPEC pAccessTime, 317 317 PCRTTIMESPEC pModificationTime, 318 318 PCRTTIMESPEC pChangeTime, … … 337 337 static uint64_t testRTFileUnlockSize; 338 338 339 RTDECL(int)testRTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock)339 extern int testRTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock) 340 340 { 341 341 /* RTPrintf("%s: hFile=%p, ofLock=%lli, cbLock=%llu\n", __func__, … … 349 349 static char testRTFileWriteData[256]; 350 350 351 RTDECL(int)testRTFileWrite(RTFILE File, const void *pvBuf, size_t cbToWrite,351 extern int testRTFileWrite(RTFILE File, const void *pvBuf, size_t cbToWrite, 352 352 size_t *pcbWritten) 353 353 { … … 388 388 } 389 389 390 RTDECL(int)testRTSymlinkDelete(const char *pszSymlink) { RTPrintf("%s\n", __func__); return 0; }391 RTDECL(int)testRTSymlinkRead(const char *pszSymlink, char *pszTarget,390 extern int testRTSymlinkDelete(const char *pszSymlink) { RTPrintf("%s\n", __func__); return 0; } 391 extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget, 392 392 size_t cbTarget) { RTPrintf("%s\n", __func__); return 0; } 393 393 … … 476 476 AssertRelease( strlen(pcszSource) * 2 + 2 < sizeof(*pDest) 477 477 - RT_UOFFSETOF(SHFLSTRING, String)); 478 pDest->string.u16Size = strlen(pcszSource) * 2 + 2;479 pDest->string.u16Length = strlen(pcszSource);478 pDest->string.u16Size = (uint16_t)strlen(pcszSource) * 2 + 2; 479 pDest->string.u16Length = (uint16_t)strlen(pcszSource); 480 480 for (i = 0; i < strlen(pcszSource) + 1; ++i) 481 481 pDest->string.String.ucs2[i] = (uint16_t)pcszSource[i]; … … 778 778 testRTFileReadData = pcszReadData; 779 779 rc = readFile(&svcTable, Root, Handle, 0, strlen(pcszReadData) + 1, 780 &cbRead, acBuf, sizeof(acBuf));780 &cbRead, acBuf, (uint32_t)sizeof(acBuf)); 781 781 RTTEST_CHECK_RC_OK(hTest, rc); 782 782 RTTEST_CHECK_MSG(hTest, … … 800 800 SHFLHANDLE Handle; 801 801 const char *pcszWrittenData = "Data to write"; 802 uint32_t cbToWrite = strlen(pcszWrittenData) + 1;802 uint32_t cbToWrite = (uint32_t)strlen(pcszWrittenData) + 1; 803 803 uint32_t cbWritten; 804 804 int rc;
Note:
See TracChangeset
for help on using the changeset viewer.