Browse Source

tests: provide unittests for internal NIB functions

master
Martine Lenders 6 years ago committed by Martine Lenders
parent
commit
0bf52f07f7
  1. 1
      tests/unittests/tests-gnrc_ipv6_nib/Makefile
  2. 6
      tests/unittests/tests-gnrc_ipv6_nib/Makefile.include
  3. 1060
      tests/unittests/tests-gnrc_ipv6_nib/tests-gnrc_ipv6_nib-internal.c
  4. 21
      tests/unittests/tests-gnrc_ipv6_nib/tests-gnrc_ipv6_nib.c
  5. 44
      tests/unittests/tests-gnrc_ipv6_nib/tests-gnrc_ipv6_nib.h

1
tests/unittests/tests-gnrc_ipv6_nib/Makefile

@ -0,0 +1 @@
include $(RIOTBASE)/Makefile.base

6
tests/unittests/tests-gnrc_ipv6_nib/Makefile.include

@ -0,0 +1,6 @@
USEMODULE += gnrc_ipv6_nib
CFLAGS += -DGNRC_IPV6_NIB_NUMOF=16
CFLAGS += -DGNRC_IPV6_NIB_DEFAULT_ROUTER_NUMOF=4
INCLUDES += -I$(RIOTBASE)/sys/net/gnrc/network_layer/ipv6/nib

1060
tests/unittests/tests-gnrc_ipv6_nib/tests-gnrc_ipv6_nib-internal.c

File diff suppressed because it is too large Load Diff

21
tests/unittests/tests-gnrc_ipv6_nib/tests-gnrc_ipv6_nib.c

@ -0,0 +1,21 @@
/*
* Copyright (C) 2017 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @{
*
* @file
* @author Martine Lenders <m.lenders@fu-berlin.de>
*/
#include "tests-gnrc_ipv6_nib.h"
void tests_gnrc_ipv6_nib(void)
{
TESTS_RUN(tests_gnrc_ipv6_nib_internal_tests());
}

44
tests/unittests/tests-gnrc_ipv6_nib/tests-gnrc_ipv6_nib.h

@ -0,0 +1,44 @@
/*
* Copyright (C) 2017 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @addtogroup unittests
* @{
*
* @file
* @brief Unittests for the ``gnrc_ipv6_nib`` module
*
* @author Martine Lenders <m.lenders@fu-berlin.de>
*/
#ifndef TESTS_GNRC_IPV6_NIB_H
#define TESTS_GNRC_IPV6_NIB_H
#include "embUnit.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief The entry point of this test suite.
*/
void tests_gnrc_ipv6_nib(void);
/**
* @brief Generates tests for internal layer
*
* @return embUnit tests if successful, NULL if not.
*/
Test *tests_gnrc_ipv6_nib_internal_tests(void);
#ifdef __cplusplus
}
#endif
#endif /* TESTS_GNRC_IPV6_NIB_H */
/** @} */
Loading…
Cancel
Save