Skip to content

Commit

Permalink
Merge pull request #18125 from miri64/unittests/fix/nanocoap-cache-co…
Browse files Browse the repository at this point in the history
…mpare

unittests: fix assertion for nanocoap_cache_key_compare()
  • Loading branch information
miri64 authored May 23, 2022
2 parents 37db22e + f91c879 commit cfefcae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unittests/tests-nanocoap_cache/tests-nanocoap_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit cfefcae

Please sign in to comment.