0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 01:31:55 +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
parent c3698535e3
commit 24a6336acf

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;
}