Page MenuHomePhabricator

D3696.diff
No OneTemporary

D3696.diff

diff --git a/services/blob/test/DatabaseManagerTest.cpp b/services/blob/test/DatabaseManagerTest.cpp
--- a/services/blob/test/DatabaseManagerTest.cpp
+++ b/services/blob/test/DatabaseManagerTest.cpp
@@ -38,13 +38,7 @@
std::shared_ptr<BlobItem> foundItem =
DatabaseManager::getInstance().findBlobItem(item.getBlobHash());
EXPECT_NE(foundItem->getCreated(), 0);
- EXPECT_EQ(item.getBlobHash().size(), foundItem->getBlobHash().size());
- EXPECT_EQ(
- memcmp(
- item.getBlobHash().data(),
- foundItem->getBlobHash().data(),
- item.getBlobHash().size()),
- 0);
+ EXPECT_EQ(item.getBlobHash(), foundItem->getBlobHash());
const BlobItem item2(generateName(), S3Path(generateName(), generateName()));
DatabaseManager::getInstance().putBlobItem(item2);
DatabaseManager::getInstance().removeBlobItem(item.getBlobHash());
@@ -65,22 +59,10 @@
item.getBlobHash());
EXPECT_EQ(foundItems.size(), 1);
std::shared_ptr<ReverseIndexItem> foundItem = foundItems.at(0);
- EXPECT_EQ(item.getBlobHash().size(), foundItem->getBlobHash().size());
- EXPECT_EQ(
- memcmp(
- item.getBlobHash().data(),
- foundItem->getBlobHash().data(),
- item.getBlobHash().size()),
- 0);
+ EXPECT_EQ(item.getBlobHash(), foundItem->getBlobHash());
foundItem = std::dynamic_pointer_cast<ReverseIndexItem>(
DatabaseManager::getInstance().findReverseIndexItemByHolder(
item.getHolder()));
- EXPECT_EQ(item.getBlobHash().size(), foundItem->getBlobHash().size());
- EXPECT_EQ(
- memcmp(
- item.getBlobHash().data(),
- foundItem->getBlobHash().data(),
- item.getBlobHash().size()),
- 0);
+ EXPECT_EQ(item.getBlobHash(), foundItem->getBlobHash());
DatabaseManager::getInstance().removeReverseIndexItem(foundItem->getHolder());
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 4:25 PM (21 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2605562
Default Alt Text
D3696.diff (1 KB)

Event Timeline