mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-02 11:37:50 +00:00
Allow constructing Buffers from std::vector
This commit is contained in:
@@ -43,6 +43,13 @@ TEST_F(BufferTest, VectorConversion) {
|
||||
EXPECT_EQ(data, string(buffer_as_vector.begin(), buffer_as_vector.end()));
|
||||
}
|
||||
|
||||
TEST_F(BufferTest, VectorConstruction) {
|
||||
const string str_data = "Hello world!";
|
||||
const vector<uint8_t> data(str_data.begin(), str_data.end());
|
||||
Buffer buffer(data);
|
||||
EXPECT_EQ(str_data, buffer);
|
||||
}
|
||||
|
||||
TEST_F(BufferTest, Equality) {
|
||||
string data = "Hello world!";
|
||||
Buffer buffer1(data);
|
||||
|
||||
Reference in New Issue
Block a user