MCPcopy Create free account
hub / github.com/facebook/CacheLib / generateRandomString

Function generateRandomString

cachelib/common/tests/BytesEqualTest.cpp:34–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32static std::mt19937 gen(folly::Random::rand32());
33
34std::vector<char> generateRandomString() {
35 static std::uniform_int_distribution<> genChar(0, 255);
36 std::vector<char> ret;
37 for (int i = 0; i < kMaxKeySize; i++) {
38 ret.push_back(static_cast<char>(genChar(gen)));
39 }
40 return ret;
41}
42
43void checkCorrectness(void* a, void* b, unsigned int len) {
44 // a has been pushed by i bytes and b has been pushed by j bytes from

Callers 2

testAllAlignmentFunction · 0.70
TESTFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected