Skip to content

Commit

Permalink
unittests/tests-ipv6_nc: add tear_down
Browse files Browse the repository at this point in the history
  • Loading branch information
cgundogan committed Mar 16, 2016
1 parent 6f6ec3c commit a2979cd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/unittests/tests-ipv6_nc/tests-ipv6_nc.c
Expand Up @@ -54,6 +54,13 @@ static void set_up(void)
gnrc_ipv6_netif_add(DEFAULT_TEST_NETIF);
}

static void tear_down(void)
{
/* remove all ncache entries, this is necesaary in case
* the last test initializes timers. */
gnrc_ipv6_nc_init();
}

static void test_ipv6_nc_add__address_registered(void)
{
ipv6_addr_t addr = DEFAULT_TEST_IPV6_ADDR;
Expand Down Expand Up @@ -469,7 +476,7 @@ Test *tests_ipv6_nc_tests(void)
new_TestFixture(test_ipv6_nc_get_l2_addr__reachable),
};

EMB_UNIT_TESTCALLER(ipv6_nc_tests, set_up, NULL, fixtures);
EMB_UNIT_TESTCALLER(ipv6_nc_tests, set_up, tear_down, fixtures);

return (Test *)&ipv6_nc_tests;
}
Expand Down

0 comments on commit a2979cd

Please sign in to comment.