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

Function init_data

lib/cpp/test/TBufferBaseTest.cpp:161–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159uint8_t data[1<<15];
160string data_str;
161void init_data() {
162 static bool initted = false;
163 if (initted) return;
164 initted = true;
165
166 // Repeatability. Kind of.
167 std::srand(42);
168 for (unsigned char & i : data) {
169 i = (uint8_t)rand();
170 }
171
172 data_str.assign((char*)data, sizeof(data));
173}
174
175
176BOOST_AUTO_TEST_SUITE( TBufferBaseTest )

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected