/foundation/filemanagement/dfs_service/test/unittests/cloudsync_sa/dentry/mock/ |
H A D | base_interface_lib_mock.cpp | 85 uint32_t RoomForFilename(const uint8_t bitmap[], size_t slots, uint32_t maxSlots) in RoomForFilename() argument 88 if (maxSlots == E_SUCCESS) { in RoomForFilename() 95 return BaseInterfaceLib::baseInterfaceLib_->RoomForFilename(bitmap, slots, maxSlots); in RoomForFilename() 98 uint32_t FindNextZeroBit(const uint8_t addr[], uint32_t maxSlots, uint32_t start) in FindNextZeroBit() argument 101 if (maxSlots == DENTRY_PER_GROUP) { in FindNextZeroBit() 108 return BaseInterfaceLib::baseInterfaceLib_->FindNextZeroBit(addr, maxSlots, start); in FindNextZeroBit() 111 uint32_t FindNextBit(const uint8_t addr[], uint32_t maxSlots, uint32_t start) in FindNextBit() argument 114 if (maxSlots == DENTRY_PER_GROUP) { in FindNextBit() 121 return BaseInterfaceLib::baseInterfaceLib_->FindNextBit(addr, maxSlots, start); in FindNextBit()
|
H A D | base_interface_lib_mock.h | 36 virtual uint32_t RoomForFilename(const uint8_t bitmap[], size_t slots, uint32_t maxSlots) = 0; 37 virtual uint32_t FindNextZeroBit(const uint8_t addr[], uint32_t maxSlots, uint32_t start) = 0; 38 virtual uint32_t FindNextBit(const uint8_t addr[], uint32_t maxSlots, uint32_t start) = 0; 54 MOCK_METHOD3(FindNextZeroBit, uint32_t(const uint8_t addr[], uint32_t maxSlots, uint32_t start)); 55 MOCK_METHOD3(FindNextBit, uint32_t(const uint8_t addr[], uint32_t maxSlots, uint32_t start));
|
/foundation/filemanagement/dfs_service/utils/dentry/include/ |
H A D | meta_file.h | 203 static uint32_t FindNextBit(const uint8_t addr[], uint32_t maxSlots, uint32_t start) in FindNextBit() 205 while (start < maxSlots) { in FindNextBit() 211 return maxSlots; in FindNextBit() 214 static uint32_t FindNextZeroBit(const uint8_t addr[], uint32_t maxSlots, uint32_t start) in FindNextZeroBit() 216 while (start < maxSlots) { in FindNextZeroBit() 222 return maxSlots; in FindNextZeroBit()
|
/foundation/filemanagement/dfs_service/test/unittests/clouddisk_database/mock/ |
H A D | meta_file_clouddisk_mock.cpp | 291 static uint32_t RoomForFilename(const uint8_t bitmap[], size_t slots, uint32_t maxSlots) in RoomForFilename() argument 296 uint32_t zeroStart = BitOps::FindNextZeroBit(bitmap, maxSlots, bitStart); in RoomForFilename() 297 if (zeroStart >= maxSlots) { in RoomForFilename() 298 return maxSlots; in RoomForFilename() 301 uint32_t zeroEnd = BitOps::FindNextBit(bitmap, maxSlots, zeroStart); in RoomForFilename() 307 if (zeroEnd + 1 >= maxSlots) { in RoomForFilename() 308 return maxSlots; in RoomForFilename()
|
/foundation/filemanagement/dfs_service/utils/dentry/src/ |
H A D | meta_file_clouddisk.cpp | 266 static uint32_t RoomForFilename(const uint8_t bitmap[], size_t slots, uint32_t maxSlots) in RoomForFilename() argument 271 uint32_t zeroStart = BitOps::FindNextZeroBit(bitmap, maxSlots, bitStart); in RoomForFilename() 272 if (zeroStart >= maxSlots) { in RoomForFilename() 273 return maxSlots; in RoomForFilename() 276 uint32_t zeroEnd = BitOps::FindNextBit(bitmap, maxSlots, zeroStart); in RoomForFilename() 282 if (zeroEnd + 1 >= maxSlots) { in RoomForFilename() 283 return maxSlots; in RoomForFilename()
|
H A D | meta_file.cpp | 255 static uint32_t RoomForFilename(const uint8_t bitmap[], size_t slots, uint32_t maxSlots) in RoomForFilename() argument 260 uint32_t zeroStart = BitOps::FindNextZeroBit(bitmap, maxSlots, bitStart); in RoomForFilename() 261 if (zeroStart >= maxSlots) { in RoomForFilename() 262 return maxSlots; in RoomForFilename() 265 uint32_t zeroEnd = BitOps::FindNextBit(bitmap, maxSlots, zeroStart); in RoomForFilename() 271 if (zeroEnd + 1 >= maxSlots) { in RoomForFilename() 272 return maxSlots; in RoomForFilename()
|
/foundation/filemanagement/dfs_service/test/unittests/cloudsync_sa/dentry/ |
H A D | dentry_meta_file_test.cpp | 625 uint32_t maxSlots = DENTRY_PER_GROUP; in HWTEST_F() local 627 EXPECT_EQ(interfaceLibMock_->FindNextZeroBit(addr, maxSlots, start), DENTRY_PER_GROUP); in HWTEST_F() 652 uint32_t maxSlots = DENTRY_PER_GROUP; in HWTEST_F() local 655 EXPECT_EQ(interfaceLibMock_->FindNextZeroBit(addr, maxSlots, start), DENTRY_PER_GROUP); in HWTEST_F() 656 EXPECT_EQ(interfaceLibMock_->FindNextBit(addr, maxSlots, start), MAX_BUCKET_LEVEL); in HWTEST_F()
|