0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 09:58:43 +00:00

lib/printf_test.c: test on strcmp fixed

we mistakenly required the return value to be only -1, 0 or 1
This commit is contained in:
Maria Matejka 2024-05-11 16:36:49 +02:00 committed by Katerina Kubecova
parent f4d4f81c7d
commit 3b50b11e9a

View File

@ -108,11 +108,11 @@ static int
t_bstrcmp(void)
{
bt_assert(bstrcmp("aa", "aa") == 0);
bt_assert(bstrcmp("aa", "bb") == -1);
bt_assert(bstrcmp("bb", "aa") == 1);
bt_assert(bstrcmp("aa", "bb") < 0);
bt_assert(bstrcmp("bb", "aa") > 0);
bt_assert(bstrcmp(NULL, NULL) == 0);
bt_assert(bstrcmp(NULL, "bb") == -1);
bt_assert(bstrcmp("bb", NULL) == 1);
bt_assert(bstrcmp(NULL, "bb") < 0);
bt_assert(bstrcmp("bb", NULL) > 0);
return 1;
}