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

Function test_strncmp

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

Source from the content-addressed store, hash-verified

156}
157
158static void test_strncmp(void **state)
159{
160 char str[] = "Banana";
161 char str2[] = "Bananas";
162
163 size_t str2_len = __builtin_strlen(str2);
164
165 assert_true(strncmp(str, str2, str2_len) < 0);
166 assert_int_equal(0, strncmp(str, str2, str2_len - 1));
167}
168
169static void test_strspn(void **state)
170{

Callers

nothing calls this directly

Calls 1

strncmpFunction · 0.50

Tested by

no test coverage detected