2023-06-18 09:37:24 -04:00
|
|
|
main()
|
|
|
|
{
|
|
|
|
name = "strncmp";
|
|
|
|
|
2023-06-18 14:03:27 -04:00
|
|
|
test_num(strncmp("test", "test", 4), 0, "same chars");
|
|
|
|
test_num(strncmp("s", "b", 4), 17, "");
|
|
|
|
test_num(strncmp("", "", 4), 0, "empty strings");
|
|
|
|
test_num(strncmp("", "a", 0), 0, "");
|
|
|
|
test_num(strncmp("ab", "ac", 1), 0, "");
|
|
|
|
test_num(strncmp("aq", "a", 1), 0, "");
|
|
|
|
test_num(strncmp("aq", "a", 2), 113, "");
|
2023-06-18 09:37:24 -04:00
|
|
|
}
|