| 30 | |
| 31 | namespace { |
| 32 | std::string genRandomStr(size_t len) { |
| 33 | std::string text; |
| 34 | text.reserve(len); |
| 35 | for (unsigned int i = 0; i < len; i++) { |
| 36 | // avoid char 0 in string |
| 37 | text += static_cast<char>(folly::Random::rand32() % UCHAR_MAX + 1); |
| 38 | } |
| 39 | return text; |
| 40 | } |
| 41 | } // namespace |
| 42 | TEST_F(NvmCacheTest, Config) { |
| 43 | struct MockEncryptor : public navy::DeviceEncryptor { |