@ -91,21 +91,21 @@ TEST(WriteBatchTest, Append) {
WriteBatch b1 , b2 ;
WriteBatch b1 , b2 ;
WriteBatchInternal : : SetSequence ( & b1 , 200 ) ;
WriteBatchInternal : : SetSequence ( & b1 , 200 ) ;
WriteBatchInternal : : SetSequence ( & b2 , 300 ) ;
WriteBatchInternal : : SetSequence ( & b2 , 300 ) ;
WriteBatchInternal : : Append ( & b1 , & b2 ) ;
b1 . Append ( b2 ) ;
ASSERT_EQ ( " " ,
ASSERT_EQ ( " " ,
PrintContents ( & b1 ) ) ;
PrintContents ( & b1 ) ) ;
b2 . Put ( " a " , " va " ) ;
b2 . Put ( " a " , " va " ) ;
WriteBatchInternal : : Append ( & b1 , & b2 ) ;
b1 . Append ( b2 ) ;
ASSERT_EQ ( " Put(a, va)@200 " ,
ASSERT_EQ ( " Put(a, va)@200 " ,
PrintContents ( & b1 ) ) ;
PrintContents ( & b1 ) ) ;
b2 . Clear ( ) ;
b2 . Clear ( ) ;
b2 . Put ( " b " , " vb " ) ;
b2 . Put ( " b " , " vb " ) ;
WriteBatchInternal : : Append ( & b1 , & b2 ) ;
b1 . Append ( b2 ) ;
ASSERT_EQ ( " Put(a, va)@200 "
ASSERT_EQ ( " Put(a, va)@200 "
" Put(b, vb)@201 " ,
" Put(b, vb)@201 " ,
PrintContents ( & b1 ) ) ;
PrintContents ( & b1 ) ) ;
b2 . Delete ( " foo " ) ;
b2 . Delete ( " foo " ) ;
WriteBatchInternal : : Append ( & b1 , & b2 ) ;
b1 . Append ( b2 ) ;
ASSERT_EQ ( " Put(a, va)@200 "
ASSERT_EQ ( " Put(a, va)@200 "
" Put(b, vb)@202 "
" Put(b, vb)@202 "
" Put(b, vb)@201 "
" Put(b, vb)@201 "