pitfall on merge iterator

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2024-01-21 12:03:40 +08:00
parent 892e6ab8f7
commit c6e700e2ea
3 changed files with 15 additions and 1 deletions

View File

@@ -120,6 +120,7 @@ fn test_task2_merge_1() {
(Bytes::from("a"), Bytes::from("1.1")),
(Bytes::from("b"), Bytes::from("2.1")),
(Bytes::from("c"), Bytes::from("3.1")),
(Bytes::from("e"), Bytes::new()),
]);
let i2 = MockIterator::new(vec![
(Bytes::from("a"), Bytes::from("1.2")),
@@ -146,6 +147,7 @@ fn test_task2_merge_1() {
(Bytes::from("b"), Bytes::from("2.1")),
(Bytes::from("c"), Bytes::from("3.1")),
(Bytes::from("d"), Bytes::from("4.2")),
(Bytes::from("e"), Bytes::new()),
],
);
@@ -158,6 +160,7 @@ fn test_task2_merge_1() {
(Bytes::from("b"), Bytes::from("2.3")),
(Bytes::from("c"), Bytes::from("3.3")),
(Bytes::from("d"), Bytes::from("4.3")),
(Bytes::from("e"), Bytes::new()),
],
);
}