10 #include <gtest/gtest.h>    17     buf.
Write(
"1234567890", 10);
    20     buf.
Write(
"123456789", 9);
    27     auto nRead = buf.
Read(r, 1);
    32     nRead = buf.
Read(&r[1], 100);
 mrpt::io::CMemoryStream CMemoryStream
 
This CStream derived class allow using a memory buffer as a CStream. 
 
uint64_t Seek(int64_t Offset, CStream::TSeekOrigin Origin=sFromBeginning) override
Introduces a pure virtual method for moving to a specified position in the streamed resource...
 
uint64_t getPosition() const override
Method for getting the current cursor position, where 0 is the first byte and TotalBytesCount-1 the l...
 
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
 
size_t Read(void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for reading from the stream. 
 
TEST(CMemoryStream, readwrite)
 
size_t Write(const void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for writing to the stream.