29 #include <gtest/gtest.h> 37 TEST(ChunkGeneratorTest, StartingConditions)
50 TEST(ChunkGeneratorTest, AdvanceToNextChunk)
65 TEST(ChunkGeneratorTest, AdvanceToLastChunk)
84 TEST(ChunkGeneratorTest, AdvanceToTheEnd)
111 TEST(ChunkGeneratorTest, SmallerLastChunk)
129 TEST(ChunkGeneratorTest, ChunkSizeGreaterThanTotalSize)
152 TEST(ChunkGeneratorTest, ChunkSizeZero)
173 TEST(ChunkGeneratorTest, StartAtNonZero)
bool next()
Advance generator to next chunk.
bool last() const
Is this the last chunk?
#define EXPECT_TRUE(expr)
A macro which verifies that expr evaluates to true.
unsigned size() const
Return size in bytes of current chunk.
This class takes an arbitrary memory region (address/length pair) and generates a series of appropria...
#define EXPECT_FALSE(expr)
A macro which verifies that expr evaluates to false.
bool done() const
Are we done? That is, did the last call to next() advance past the end of the region?
unsigned complete() const
Number of bytes we have already chunked up.
TEST(ChunkGeneratorTest, StartingConditions)
Addr addr() const
Return starting address of current chunk.
Declaration and inline definition of ChunkGenerator object.
#define EXPECT_EQ(lhs, rhs)
A macro which verifies that lhs and rhs are equal to each other.