Skip to content

Commit 85cd40d

Browse files
committed
Added unit test for InternalKey::DecodeFrom with empty string.
PiperOrigin-RevId: 247483339
1 parent 1aae5c9 commit 85cd40d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

db/dbformat_test.cc

+6
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ TEST(FormatTest, InternalKey_EncodeDecode) {
6565
}
6666
}
6767

68+
TEST(FormatTest, InternalKey_DecodeFromEmpty) {
69+
InternalKey internal_key;
70+
71+
ASSERT_TRUE(!internal_key.DecodeFrom(""));
72+
}
73+
6874
TEST(FormatTest, InternalKeyShortSeparator) {
6975
// When user keys are same
7076
ASSERT_EQ(IKey("foo", 100, kTypeValue),

0 commit comments

Comments
 (0)