Helper routine for testing TEST_SkipToNextSpecialByte
| 200 | |
| 201 | // Helper routine for testing TEST_SkipToNextSpecialByte |
| 202 | size_t FindSpecial(const string& x) { |
| 203 | const char* p = x.data(); |
| 204 | const char* limit = p + x.size(); |
| 205 | const char* result = OrderedCode::TEST_SkipToNextSpecialByte(p, limit); |
| 206 | return result - p; |
| 207 | } |
| 208 | |
| 209 | // Helper function template to create strings from string literals (excluding |
| 210 | // the terminal zero byte of the underlying character array). |