| 143 | |
| 144 | template <typename ValidationFunc> |
| 145 | void ValidateWithPrefixes(ValidationFunc&& validate, const std::string& s) { |
| 146 | // Exercise SIMD optimizations |
| 147 | for (int prefix_size = 1; prefix_size < 64; ++prefix_size) { |
| 148 | std::string longer(prefix_size, 'x'); |
| 149 | longer.append(s); |
| 150 | ASSERT_TRUE(validate(longer)); |
| 151 | longer.append(prefix_size, 'y'); |
| 152 | ASSERT_TRUE(validate(longer)); |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | void AssertValidUTF8(const std::string& s) { ASSERT_TRUE(IsValidUTF8(s)); } |
| 157 |
no test coverage detected