| 115 | } |
| 116 | |
| 117 | size_t DistanceToOne(size_t n) |
| 118 | { |
| 119 | size_t dist; |
| 120 | for (dist = 0; n != 1; dist++) |
| 121 | { |
| 122 | n = (n >> 1); |
| 123 | } |
| 124 | |
| 125 | TEST(n == 1); // n was not a power of 2! |
| 126 | |
| 127 | return dist; |
| 128 | } |
| 129 | |
| 130 | |
| 131 | void ConvertAndCompareString(const std::string& s) |
nothing calls this directly
no outgoing calls
no test coverage detected