Added Buffer::Buffer(iter, iter) constructor overload

This commit is contained in:
accelerated
2018-12-02 14:42:02 -05:00
parent 57bddabfd0
commit 0b7931bfb8
3 changed files with 10 additions and 2 deletions

View File

@@ -39,7 +39,11 @@ TEST_CASE("construction", "[buffer]") {
const string str_data = "Hello world!";
const vector<uint8_t> data(str_data.begin(), str_data.end());
const Buffer buffer(data);
const Buffer buffer2(data.begin(), data.end());
const Buffer buffer3(str_data.data(), str_data.data() + str_data.size());
CHECK(str_data == buffer);
CHECK(buffer == buffer2);
CHECK(buffer == buffer3);
}