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

Merge pull request #18125 from miri64/unittests/fix/nanocoap-cache-compare

unittests: fix assertion for nanocoap_cache_key_compare()
This commit is contained in:
Martine Lenders 2022-05-23 16:35:16 +02:00 committed by GitHub
commit cfefcae42d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
{