Makes a string with deterministic distinct content.
| 711 | |
| 712 | // Makes a string with deterministic distinct content. |
| 713 | void makeLargeString(int32_t approxSize, std::string& string) { |
| 714 | string.reserve(approxSize); |
| 715 | while (string.size() < string.capacity() - 20) { |
| 716 | auto size = string.size(); |
| 717 | auto number = |
| 718 | fmt::format("{}", (size + 1 + approxSize) * 0xc6a4a7935bd1e995L); |
| 719 | string.resize(size + number.size()); |
| 720 | memcpy(&string[size], &number[0], number.size()); |
| 721 | } |
| 722 | } |
| 723 | } // namespace |
| 724 | |
| 725 | namespace { |