Skip to content

Commit

Permalink
fixup! nanocoap_cache: add helper function to check if entry is stale
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed May 13, 2022
1 parent eaaaaf8 commit edec966
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/unittests/tests-nanocoap_cache/tests-nanocoap_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ static void test_nanocoap_cache__max_age(void)
(1 sec buffer) */
now = ztimer_now(ZTIMER_SEC);
TEST_ASSERT(nanocoap_cache_entry_is_stale(c, now + 61));
/* check overflow cases */
c->max_age = UINT32_MAX - 40;
TEST_ASSERT(nanocoap_cache_entry_is_stale(c, 20));
}

Test *tests_nanocoap_cache_tests(void)
Expand Down

0 comments on commit edec966

Please sign in to comment.