MCPcopy Create free account
hub / github.com/coreboot/coreboot / test_strcspn

Function test_strcspn

tests/lib/string-test.c:179–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179static void test_strcspn(void **state)
180{
181 char str[] = "12340000";
182 char str2[] = "00001234";
183 char str3[] = "1234";
184
185 assert_int_equal(0, strcspn(str, str3));
186 assert_int_equal(4, strcspn(str2, str3));
187}
188
189/* Please bear in mind that `atol()` uses `strspn()` internally, so the result
190 of `test_atol` is dependent on the result of `test_strspn`. */

Callers

nothing calls this directly

Calls 1

strcspnFunction · 0.50

Tested by

no test coverage detected