Skip to content
Snippets Groups Projects
Commit 022191d7 authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Added API for packet realdata tests.

Refs #1027 @10m
parent 27ffe712
No related branches found
No related tags found
No related merge requests found
......@@ -212,3 +212,5 @@ src/dnslib/tests/dnslib/dname_table_tests.h
src/dnslib/tests/dnslib/dname_table_tests.c
src/dnslib/tests/dnslib/packet_tests.c
src/dnslib/tests/dnslib/packet_tests.h
src/dnslib/tests/realdata/dnslib/packet_tests_realdata.c
src/dnslib/tests/realdata/dnslib/packet_tests_realdata.h
......@@ -75,6 +75,8 @@ unittests_dnslib_realdata_SOURCES = \
dnslib/tests/realdata/dnslib/rrset_tests_realdata.c \
dnslib/tests/realdata/dnslib/zone_tests_realdata.c \
dnslib/tests/realdata/dnslib/zonedb_tests_realdata.c \
dnslib/tests/realdata/dnslib/packet_tests_realdata.h \
dnslib/tests/realdata/dnslib/packet_tests_realdata.c \
dnslib/tests/realdata/dnslib_tests_loader_realdata.h \
dnslib/tests/realdata/dnslib_tests_loader_realdata.c \
dnslib/tests/realdata/unittests_dnslib_realdata.c
......
/* blame: jan.kadlec@nic.cz */
#include <assert.h>
#include "packet_tests_realdata.h"
#include "dnslib/error.h"
#include "dnslib/packet.h"
/* *test_t structures */
#include "dnslib/tests/realdata/dnslib_tests_loader_realdata.h"
static int packet_tests_count(int argc, char *argv[]);
static int packet_tests_run(int argc, char *argv[]);
/*! Exported unit API.
*/
unit_api packet_tests_api = {
"Packet", //! Unit name
&packet_tests_count, //! Count scheduled tests
&packet_tests_run //! Run scheduled tests
};
static const uint DNSLIB_PACKET_TEST_COUNT = 14;
static int packet_tests_count(int argc, char *argv[])
{
return DNSLIB_PACKET_TEST_COUNT;
}
static int packet_tests_run(int argc, char *argv[])
{
}
#ifndef _KNOT_PACKET_REALDATA_TESTS_H_
#define _KNOT_PACKET_REALDATA_TESTS_H_
#include "common/libtap/tap_unit.h"
/* Unit API. */
unit_api packet_tests_api;
#endif /* _KNOT_PACKET_REALDATA_TESTS_H_ */
......@@ -13,6 +13,7 @@
#include "dnslib/rrset_tests_realdata.h"
//#include "dnslib/zone_tests_realdata.h"
#include "dnslib/zonedb_tests_realdata.h"
#include "dnslib/packet_tests_realdata.h"
#include "common/lists.h"
// Run all loaded units
......@@ -41,6 +42,7 @@ int main(int argc, char *argv[])
&rrset_tests_api, //! DNS library (rrset) unit
// &zone_tests_api, //! DNS library (zone) unit
// &zonedb_tests_api, //! DNS library (zonedb) unit
&packet_tests_api,
NULL
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment