MCPcopy Create free account
hub / github.com/Kitware/CMake / testUTF8

Function testUTF8

Tests/CMakeLib/testUTF8.cxx:158–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158int testUTF8(int /*unused*/, char* /*unused*/[])
159{
160 int result = 0;
161 for (test_utf8_entry const* e = good_entry; !e->str.empty(); ++e) {
162 if (!decode_good(*e)) {
163 result = 1;
164 }
165 if (!is_valid(e->str)) {
166 result = 1;
167 }
168 }
169 for (test_utf8_char* c = bad_chars; !(*c).empty(); ++c) {
170 if (!decode_bad(*c)) {
171 result = 1;
172 }
173 if (!is_invalid(*c)) {
174 result = 1;
175 }
176 }
177 for (char const** s = good_strings; *s; ++s) {
178 if (!is_valid(*s)) {
179 result = 1;
180 }
181 }
182 for (char const** s = bad_strings; *s; ++s) {
183 if (!is_invalid(*s)) {
184 result = 1;
185 }
186 }
187 return result;
188}

Callers

nothing calls this directly

Calls 5

decode_goodFunction · 0.85
is_validFunction · 0.85
decode_badFunction · 0.85
is_invalidFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…