MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / TEST_F

Function TEST_F

src/IO/tests/gtest_reader_executor.cpp:109–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107};
108
109TEST_F(ReaderExecutorTest, SequentialReadSingleObject)
110{
111 StoredObjects objects{makeFile("a.bin", 1024)};
112 ReaderExecutor ex(std::make_shared<LocalSourceReader>(), objects, /*block_size=*/256);
113
114 EXPECT_EQ(ex.totalSize(), 1024u);
115 EXPECT_FALSE(ex.hasUnknownSize());
116
117 auto data = drain(ex);
118 ASSERT_EQ(data.size(), 1024u);
119 for (size_t i = 0; i < data.size(); ++i)
120 ASSERT_EQ(static_cast<unsigned char>(data[i]), patternByte(i)) << "at offset " << i;
121 EXPECT_EQ(ex.getPosition(), 1024u);
122}
123
124TEST_F(ReaderExecutorTest, WindowNeverExceedsBlockSize)
125{

Callers

nothing calls this directly

Calls 12

readNextWindowMethod · 0.80
patternByteFunction · 0.70
totalSizeMethod · 0.45
hasUnknownSizeMethod · 0.45
sizeMethod · 0.45
getPositionMethod · 0.45
atEndMethod · 0.45
totalBytesMethod · 0.45
peekMethod · 0.45
seekMethod · 0.45
stringMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected