| 95 | } |
| 96 | |
| 97 | static int NextLength(int length) { |
| 98 | if (length < 10) { |
| 99 | length += 1; |
| 100 | } else if (length < 100) { |
| 101 | length += 10; |
| 102 | } else if (length < 1000) { |
| 103 | length += 100; |
| 104 | } else { |
| 105 | length += 1000; |
| 106 | } |
| 107 | return length; |
| 108 | } |
| 109 | |
| 110 | TEST(BloomTest, VaryingLengths) { |
| 111 | char buffer[sizeof(int)]; |