aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/util
diff options
context:
space:
mode:
authorGravatar Ara Ayvazyan <Aivazyan@microsoft.com>2018-05-22 20:47:35 -0700
committerGravatar Ara Ayvazyan <Aivazyan@microsoft.com>2018-05-22 20:47:35 -0700
commit8d06d097bc313eb8483bddfe716ccf39c50366f5 (patch)
tree630850625cdb48e52ff911e537a53baab40632d3 /test/cpp/util
parent18ce0cf26e733647b33cbaafee57245fdfb932e7 (diff)
Fix broken ByteBuffer copy ctor
Diffstat (limited to 'test/cpp/util')
-rw-r--r--test/cpp/util/byte_buffer_test.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc
index 47a5b7f03a..b48a53eed1 100644
--- a/test/cpp/util/byte_buffer_test.cc
+++ b/test/cpp/util/byte_buffer_test.cc
@@ -38,6 +38,13 @@ const char* kContent2 = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy world";
class ByteBufferTest : public ::testing::Test {};
+TEST_F(ByteBufferTest, CopyCtor) {
+ ByteBuffer buffer1;
+ EXPECT_FALSE(buffer1.Valid());
+ ByteBuffer buffer2 = buffer1;
+ EXPECT_FALSE(buffer2.Valid());
+}
+
TEST_F(ByteBufferTest, CreateFromSingleSlice) {
Slice s(kContent1);
ByteBuffer buffer(&s, 1);