1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Fix test added for lstComparatorZ() in 9abf6a27.

strcmp() returns < 0 and > 0 but these are not guaranteed to be -1 and 1.
This commit is contained in:
David Steele 2021-08-06 11:26:12 -04:00
parent 0679128461
commit 33775e53c9

View File

@ -188,8 +188,8 @@ testRun(void)
const char *string2 = "def";
TEST_RESULT_INT(lstComparatorZ(&string1, &string1), 0, "strings are equal");
TEST_RESULT_INT(lstComparatorZ(&string1, &string2), -1, "first string is less");
TEST_RESULT_INT(lstComparatorZ(&string2, &string1), 1, "first string is greater");
TEST_RESULT_BOOL(lstComparatorZ(&string1, &string2) < 0, true, "first string is less");
TEST_RESULT_BOOL(lstComparatorZ(&string2, &string1) > 0, true, "first string is greater");
}
// *****************************************************************************************************************************