1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

unittests: fix assertion for nanocoap_cache_key_compare()

The doc states only that the result is <0, not -1. The result isn't the
latter for some platforms (see
https://github.com/RIOT-OS/RIOT/runs/6534330788?check_suite_focus=true#step:13:696)
This commit is contained in:
Martine Lenders 2022-05-23 12:22:44 +02:00
parent dc7bc9f854
commit f91c8799c6
No known key found for this signature in database
GPG Key ID: 2134D77A5336DD80

View File

@ -70,9 +70,9 @@ static void test_nanocoap_cache__cachekey(void)
nanocoap_cache_key_generate((const coap_pkt_t *) &pkt2, digest2);
/* compare 1. and 3. packet */
TEST_ASSERT_EQUAL_INT(-1, nanocoap_cache_key_compare(digest1, digest2));
TEST_ASSERT(nanocoap_cache_key_compare(digest1, digest2) < 0);
/* compare 3. and 1. packet */
TEST_ASSERT_EQUAL_INT(1, nanocoap_cache_key_compare(digest2, digest1));
TEST_ASSERT(nanocoap_cache_key_compare(digest2, digest1) > 0);
}
static void test_nanocoap_cache__add(void)
{