mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
@20776309
* env_chromium.cc should not export symbols. * Fix MSVC warnings. * Removed large value support. * Fix broken reference to documentation file git-svn-id: https://leveldb.googlecode.com/svn/trunk@24 62dab493-f737-651d-591e-8d6aee1b9529
This commit is contained in:
@@ -29,13 +29,6 @@ static std::string PrintContents(WriteBatch* b) {
|
||||
state.append(iter->value().ToString());
|
||||
state.append(")");
|
||||
break;
|
||||
case kTypeLargeValueRef:
|
||||
state.append("PutRef(");
|
||||
state.append(ikey.user_key.ToString());
|
||||
state.append(", ");
|
||||
state.append(iter->value().ToString());
|
||||
state.append(")");
|
||||
break;
|
||||
case kTypeDeletion:
|
||||
state.append("Delete(");
|
||||
state.append(ikey.user_key.ToString());
|
||||
@@ -74,22 +67,6 @@ TEST(WriteBatchTest, Multiple) {
|
||||
PrintContents(&batch));
|
||||
}
|
||||
|
||||
TEST(WriteBatchTest, PutIndirect) {
|
||||
WriteBatch batch;
|
||||
batch.Put(Slice("baz"), Slice("boo"));
|
||||
LargeValueRef h;
|
||||
for (int i = 0; i < LargeValueRef::ByteSize(); i++) {
|
||||
h.data[i] = (i < 20) ? 'a' : 'b';
|
||||
}
|
||||
WriteBatchInternal::PutLargeValueRef(&batch, Slice("foo"), h);
|
||||
WriteBatchInternal::SetSequence(&batch, 100);
|
||||
ASSERT_EQ(100, WriteBatchInternal::Sequence(&batch));
|
||||
ASSERT_EQ(2, WriteBatchInternal::Count(&batch));
|
||||
ASSERT_EQ("Put(baz, boo)@100"
|
||||
"PutRef(foo, aaaaaaaaaaaaaaaaaaaabbbbbbbbb)@101",
|
||||
PrintContents(&batch));
|
||||
}
|
||||
|
||||
TEST(WriteBatchTest, Corruption) {
|
||||
WriteBatch batch;
|
||||
batch.Put(Slice("foo"), Slice("bar"));
|
||||
|
||||
Reference in New Issue
Block a user