src/base/chunk_generator.test.cc
/*
 * When a chunk size is greater than the total size, the chunk size
 * is effectively that of the region size. This test will verify this
 * corner-case.
 */
When a chunk size is greater than the total size, the chunk size
is effectively that of the region size. This test will verify this
corner-case.
When a chunk size is greater than the total size the chunk size is effectively that of the region size . This test will verify this corner - case .
TEST(ChunkGeneratorTest, ChunkSizeGreaterThanTotalSize)
{
    ChunkGenerator chunk_generator(0, 32, 64);
    EXPECT_EQ(0, chunk_generator.addr());
    EXPECT_EQ(32, chunk_generator.size());
    EXPECT_EQ(0, chunk_generator.complete());
    EXPECT_FALSE(chunk_generator.done());
    EXPECT_TRUE(chunk_generator.last());
    EXPECT_FALSE(chunk_generator.next());
    EXPECT_EQ(0, chunk_generator.addr());
    EXPECT_EQ(0, chunk_generator.size());
    EXPECT_EQ(0, chunk_generator.complete());
    EXPECT_TRUE(chunk_generator.done());
    EXPECT_TRUE(chunk_generator.last());
}
TEST ( ChunkGeneratorTest , ChunkSizeGreaterThanTotalSize ) { ChunkGenerator chunk_generator ( 0 , 32 , 64 ) ; EXPECT_EQ ( 0 , chunk_generator . addr ( ) ) ; EXPECT_EQ ( 32 , chunk_generator . size ( ) ) ; EXPECT_EQ ( 0 , chunk_generator . complete ( ) ) ; EXPECT_FALSE ( chunk_generator . done ( ) ) ; EXPECT_TRUE ( chunk_generator . last ( ) ) ; EXPECT_FALSE ( chunk_generator . next ( ) ) ; EXPECT_EQ ( 0 , chunk_generator . addr ( ) ) ; EXPECT_EQ ( 0 , chunk_generator . size ( ) ) ; EXPECT_EQ ( 0 , chunk_generator . complete ( ) ) ; EXPECT_TRUE ( chunk_generator . done ( ) ) ; EXPECT_TRUE ( chunk_generator . last ( ) ) ; }
When a chunk size is greater than the total size, the chunk size
 is effectively that of the region size.
When a chunk size is greater than the total size the chunk size is effectively that of the region size .
// Process the entire region.