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

Function test_strchr

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

Source from the content-addressed store, hash-verified

71}
72
73static void test_strchr(void **state)
74{
75 char str[] = "Abracadabra!\n";
76
77 assert_ptr_equal(str, strchr(str, 'A'));
78 assert_ptr_equal(str + 3, strchr(str, 'a'));
79 assert_ptr_equal(str + 12, strchr(str, '\n'));
80
81 assert_null(strchr(str, 'z'));
82}
83
84
85static void test_strrchr(void **state)

Callers

nothing calls this directly

Calls 1

strchrFunction · 0.50

Tested by

no test coverage detected