aboutsummaryrefslogtreecommitdiff
path: root/types_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'types_test.cpp')
-rw-r--r--types_test.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/types_test.cpp b/types_test.cpp
index 2c99f951..41fa1db2 100644
--- a/types_test.cpp
+++ b/types_test.cpp
@@ -117,3 +117,20 @@ TEST(IOVector, misaligned_split) {
ASSERT_EQ(1ULL, bc.size());
ASSERT_EQ(create_block("x"), bc.coalesce());
}
+
+TEST(IOVector, drop_front) {
+ IOVector vec;
+
+ vec.append(create_block('x', 2));
+ vec.append(create_block('y', 1000));
+ ASSERT_EQ(2U, vec.front_size());
+ ASSERT_EQ(1002U, vec.size());
+
+ vec.drop_front(1);
+ ASSERT_EQ(1U, vec.front_size());
+ ASSERT_EQ(1001U, vec.size());
+
+ vec.drop_front(1);
+ ASSERT_EQ(1000U, vec.front_size());
+ ASSERT_EQ(1000U, vec.size());
+}