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

Function test_strrchr

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

Source from the content-addressed store, hash-verified

83
84
85static void test_strrchr(void **state)
86{
87 char str[] = "Abracadabra!\n";
88
89 assert_ptr_equal(str, strrchr(str, 'A'));
90 assert_ptr_equal(str + 9, strrchr(str, 'r'));
91 assert_ptr_equal(str + 12, strrchr(str, '\n'));
92
93 assert_null(strrchr(str, 'z'));
94}
95
96static void test_strncpy(void **state)
97{

Callers

nothing calls this directly

Calls 1

strrchrFunction · 0.50

Tested by

no test coverage detected