From 1f8dc506029f204db0e3dd1b80e7274c71648fc8 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 30 Jan 2018 12:32:06 +0100 Subject: [PATCH] tests: adapt NIB tests for lifetime unit conversion --- tests/gnrc_ipv6_nib/main.c | 4 ++-- tests/gnrc_ipv6_nib_6ln/main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/gnrc_ipv6_nib/main.c b/tests/gnrc_ipv6_nib/main.c index 399df9569..3e699ee40 100644 --- a/tests/gnrc_ipv6_nib/main.c +++ b/tests/gnrc_ipv6_nib/main.c @@ -1114,8 +1114,8 @@ static void test_handle_pkt__rtr_adv__success(uint8_t rtr_adv_flags, "Unexpected prefix configured"); TEST_ASSERT_EQUAL_INT(_LOC_GB_PFX_LEN, prefix.pfx_len); TEST_ASSERT_EQUAL_INT(_mock_netif->pid, prefix.iface); - TEST_ASSERT(_PIO_PFX_LTIME < prefix.valid_until); - TEST_ASSERT(_PIO_PFX_LTIME < prefix.pref_until); + TEST_ASSERT((_PIO_PFX_LTIME / MS_PER_SEC) < prefix.valid_until); + TEST_ASSERT((_PIO_PFX_LTIME / MS_PER_SEC) < prefix.pref_until); } } if (!pio || !(pio_flags & NDP_OPT_PI_FLAGS_L)) { diff --git a/tests/gnrc_ipv6_nib_6ln/main.c b/tests/gnrc_ipv6_nib_6ln/main.c index 4e9335621..beaea30eb 100644 --- a/tests/gnrc_ipv6_nib_6ln/main.c +++ b/tests/gnrc_ipv6_nib_6ln/main.c @@ -1072,8 +1072,8 @@ static void test_handle_pkt__rtr_adv__success(uint8_t rtr_adv_flags, "Unexpected prefix configured"); TEST_ASSERT_EQUAL_INT(_LOC_GB_PFX_LEN, prefix.pfx_len); TEST_ASSERT_EQUAL_INT(_mock_netif->pid, prefix.iface); - TEST_ASSERT(_PIO_PFX_LTIME < prefix.valid_until); - TEST_ASSERT(_PIO_PFX_LTIME < prefix.pref_until); + TEST_ASSERT((_PIO_PFX_LTIME / MS_PER_SEC) < prefix.valid_until); + TEST_ASSERT((_PIO_PFX_LTIME / MS_PER_SEC) < prefix.pref_until); } } if (!pio) {