src/base/chunk_generator.test.cc
/*
 * A simple test to check the move to the next chunk under normal conditions.
 */
A simple test to check the move to the next chunk under normal conditions.
A simple test to check the move to the next chunk under normal conditions .
TEST(ChunkGeneratorTest, AdvanceToNextChunk)
{
    ChunkGenerator chunk_generator(0, 1024, 8);
    EXPECT_EQ(0, chunk_generator.addr());
    EXPECT_TRUE(chunk_generator.next());
    EXPECT_EQ(8, chunk_generator.addr());
    EXPECT_EQ(8, chunk_generator.size());
    EXPECT_EQ(8, chunk_generator.complete());
    EXPECT_FALSE(chunk_generator.done());
    EXPECT_FALSE(chunk_generator.last());
}
TEST ( ChunkGeneratorTest , AdvanceToNextChunk ) { ChunkGenerator chunk_generator ( 0 , 1024 , 8 ) ; EXPECT_EQ ( 0 , chunk_generator . addr ( ) ) ; EXPECT_TRUE ( chunk_generator . next ( ) ) ; EXPECT_EQ ( 8 , chunk_generator . addr ( ) ) ; EXPECT_EQ ( 8 , chunk_generator . size ( ) ) ; EXPECT_EQ ( 8 , chunk_generator . complete ( ) ) ; EXPECT_FALSE ( chunk_generator . done ( ) ) ; EXPECT_FALSE ( chunk_generator . last ( ) ) ; }
A simple test to check the move to the next chunk under normal conditions.
A simple test to check the move to the next chunk under normal conditions .