MCPcopy Create free account
hub / github.com/apache/brpc / rand_string

Function rand_string

test/recordio_unittest.cpp:232–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232static std::string rand_string(int min_len, int max_len) {
233 const int len = butil::fast_rand_in(min_len, max_len);
234 std::string str;
235 str.reserve(len);
236 for (int i = 0; i < len; ++i) {
237 str.push_back(butil::fast_rand_in('a', 'Z'));
238 }
239 return str;
240}
241
242TEST(RecordIOTest, write_read_random) {
243 StringWriter sw;

Callers 1

TESTFunction · 0.85

Calls 3

fast_rand_inFunction · 0.85
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected