40 #include <gtest/gtest.h> 45 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7,
46 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf,
50 TEST(CircleBufTest, BasicReadWriteNoOverflow)
71 TEST(CircleBufTest, SingleWriteOverflow)
84 TEST(CircleBufTest, MultiWriteOverflow)
99 TEST(CircleBufTest, PointerWrapAround)
113 buf.
read(foo + 4, 6);
117 buf.
read(foo + 10, 2);
void peek(OutputIterator out, size_t len) const
Copy buffer contents without advancing the read pointer.
TEST(CircleBufTest, BasicReadWriteNoOverflow)
void write(InputIterator in, size_t len)
Add elements to the end of the ring buffers and advance.
void read(OutputIterator out, size_t len)
Copy buffer contents and advance the read pointer.
#define EXPECT_EQ(lhs, rhs)
A macro which verifies that lhs and rhs are equal to each other.