MCPcopy Create free account
hub / github.com/apache/thrift / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

lib/cpp/test/TBufferBaseTest.cpp:178–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176BOOST_AUTO_TEST_SUITE( TBufferBaseTest )
177
178BOOST_AUTO_TEST_CASE( test_MemoryBuffer_Write_GetBuffer ) {
179 init_data();
180
181 for (auto & d1 : dist) {
182 TMemoryBuffer buffer(16);
183 int offset = 0;
184 int index = 0;
185
186 while (offset < 1<<15) {
187 buffer.write(&data[offset], d1[index]);
188 offset += d1[index];
189 index++;
190 }
191
192 string output = buffer.getBufferAsString();
193 BOOST_CHECK_EQUAL(data_str, output);
194 }
195}
196
197BOOST_AUTO_TEST_CASE( test_MemoryBuffer_Write_Read ) {
198 init_data();

Callers

nothing calls this directly

Calls 9

init_dataFunction · 0.85
getBufferAsStringMethod · 0.80
readAppendToStringMethod · 0.80
writeMethod · 0.65
readMethod · 0.65
substrMethod · 0.45
flushMethod · 0.45
readAllMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected