vbox的更動 39542 路徑 trunk/src/VBox/HostServices/SharedFolders
- 時間撮記:
- 2011-12-6 下午04:48:23 (13 年 以前)
- 位置:
- trunk/src/VBox/HostServices/SharedFolders
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/HostServices/SharedFolders/mappings.cpp
r39540 r39542 16 16 17 17 #ifdef UNITTEST 18 # include "teststubs.h"19 18 # include "testcase/tstSharedFolderService.h" 20 19 #endif … … 24 23 #include <iprt/assert.h> 25 24 #include <iprt/string.h> 25 26 #ifdef UNITTEST 27 # include "teststubs.h" 28 #endif 26 29 27 30 /* Shared folders order in the saved state and in the FolderMapping can differ. -
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; -
trunk/src/VBox/HostServices/SharedFolders/teststubs.h
r39540 r39542 24 24 #define __VBSF_TEST_STUBS__H 25 25 26 #include <iprt/dir.h> 27 #include <iprt/time.h> 28 26 29 #define RTDirClose testRTDirClose 30 extern int testRTDirClose(PRTDIR pDir); 27 31 #define RTDirCreate testRTDirCreate 32 extern int testRTDirCreate(const char *pszPath, RTFMODE fMode); 28 33 #define RTDirOpen testRTDirOpen 34 extern int testRTDirOpen(PRTDIR *ppDir, const char *pszPath); 29 35 #define RTDirQueryInfo testRTDirQueryInfo 36 extern int testRTDirQueryInfo(PRTDIR pDir, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs); 30 37 #define RTDirRemove testRTDirRemove 38 extern int testRTDirRemove(const char *pszPath); 31 39 #define RTDirReadEx testRTDirReadEx 40 extern int testRTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags); 32 41 #define RTDirSetTimes testRTDirSetTimes 42 extern int testRTDirSetTimes(PRTDIR pDir, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime); 33 43 #define RTFileClose testRTFileClose 44 extern int testRTFileClose(RTFILE hFile); 34 45 #define RTFileDelete testRTFileDelete 46 extern int testRTFileDelete(const char *pszFilename); 35 47 #define RTFileFlush testRTFileFlush 48 extern int testRTFileFlush(RTFILE hFile); 36 49 #define RTFileLock testRTFileLock 50 extern int testRTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock); 37 51 #define RTFileOpen testRTFileOpen 52 extern int testRTFileOpen(PRTFILE pFile, const char *pszFilename, uint64_t fOpen); 38 53 #define RTFileQueryInfo testRTFileQueryInfo 54 extern int testRTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs); 39 55 #define RTFileRead testRTFileRead 56 extern int testRTFileRead(RTFILE hFile, void *pvBuf, size_t cbToRead, size_t *pcbRead); 40 57 #define RTFileSetMode testRTFileSetMode 58 extern int testRTFileSetMode(RTFILE hFile, RTFMODE fMode); 41 59 #define RTFileSetSize testRTFileSetSize 60 extern int testRTFileSetSize(RTFILE hFile, uint64_t cbSize); 42 61 #define RTFileSetTimes testRTFileSetTimes 62 extern int testRTFileSetTimes(RTFILE hFile, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime); 43 63 #define RTFileSeek testRTFileSeek 64 extern int testRTFileSeek(RTFILE hFile, int64_t offSeek, unsigned uMethod, uint64_t *poffActual); 44 65 #define RTFileUnlock testRTFileUnlock 66 extern int testRTFileUnlock(RTFILE hFile, int64_t offLock, uint64_t cbLock); 45 67 #define RTFileWrite testRTFileWrite 68 extern int testRTFileWrite(RTFILE hFile, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten); 46 69 #define RTFsQueryProperties testRTFsQueryProperties 70 extern int testRTFsQueryProperties(const char *pszFsPath, PRTFSPROPERTIES pProperties); 47 71 #define RTFsQuerySerial testRTFsQuerySerial 72 extern int testRTFsQuerySerial(const char *pszFsPath, uint32_t *pu32Serial); 48 73 #define RTFsQuerySizes testRTFsQuerySizes 74 extern int testRTFsQuerySizes(const char *pszFsPath, RTFOFF *pcbTotal, RTFOFF *pcbFree, uint32_t *pcbBlock, uint32_t *pcbSector); 49 75 #define RTPathQueryInfoEx testRTPathQueryInfoEx 76 extern int testRTPathQueryInfoEx(const char *pszPath, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags); 50 77 #define RTSymlinkDelete testRTSymlinkDelete 78 extern int testRTSymlinkDelete(const char *pszSymlink); 51 79 #define RTSymlinkRead testRTSymlinkRead 80 extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget); 52 81 53 82 #endif /* __VBSF_TEST_STUBS__H */ -
trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
r39540 r39542 17 17 18 18 #ifdef UNITTEST 19 # include "teststubs.h"20 19 # include "testcase/tstSharedFolderService.h" 21 20 #endif … … 37 36 #ifdef RT_OS_DARWIN 38 37 # include <Carbon/Carbon.h> 38 #endif 39 40 #ifdef UNITTEST 41 # include "teststubs.h" 39 42 #endif 40 43
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器