MCPcopy Create free account
hub / github.com/apache/arrow / ValidateWithPrefixes

Function ValidateWithPrefixes

cpp/src/arrow/util/utf8_util_test.cc:145–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143
144template <typename ValidationFunc>
145void 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
156void AssertValidUTF8(const std::string& s) { ASSERT_TRUE(IsValidUTF8(s)); }
157

Callers 2

AssertValidASCIIFunction · 0.85
AssertInvalidASCIIFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected