]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[25901_atf] Skeleton for hash tests added.
authorTomek Mrugalski <tomasz@isc.org>
Fri, 29 Jun 2012 15:06:21 +0000 (17:06 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 29 Jun 2012 15:06:21 +0000 (17:06 +0200)
common/tests/Atffile [new file with mode: 0644]
common/tests/Makefile.am
common/tests/hash_unittest.c [new file with mode: 0644]

diff --git a/common/tests/Atffile b/common/tests/Atffile
new file mode 100644 (file)
index 0000000..14b1055
--- /dev/null
@@ -0,0 +1,7 @@
+Content-Type: application/X-atf-atffile; version="1"
+
+prop: test-suite = dhcp4
+
+tp-glob: test_alloc
+tp-glob: hash_unittest
+
index dd55e4fb86b31b6f3f93cac79812a78ac16cb820..a073c357a7a7caf9c193a741255a1ecf8eb67005 100644 (file)
@@ -2,7 +2,7 @@ SUBDIRS = .
 
 AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
 
-ATF_TESTS = alloc_unittest
+ATF_TESTS = alloc_unittest hash_unittest
 
 check_PROGRAMS = $(ATF_TESTS)
 
@@ -12,5 +12,12 @@ alloc_unittest_LDADD += ../libdhcp.a  \
        ../../omapip/libomapi.a ../../bind/lib/libdns.a \
         ../../bind/lib/libisc.a
 
+
+hash_unittest_SOURCES = hash_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
+hash_unittest_LDADD = $(ATF_LDFLAGS)
+hash_unittest_LDADD += ../libdhcp.a  \
+       ../../omapip/libomapi.a ../../bind/lib/libdns.a \
+        ../../bind/lib/libisc.a
+
 check: $(ATF_TESTS)
        atf-run | atf-report
diff --git a/common/tests/hash_unittest.c b/common/tests/hash_unittest.c
new file mode 100644 (file)
index 0000000..fcc1feb
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2012 by Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *   Internet Systems Consortium, Inc.
+ *   950 Charter Street
+ *   Redwood City, CA 94063
+ *   <info@isc.org>
+ *   https://www.isc.org/
+ *
+ */
+
+#include "config.h"
+#include <atf-c.h>
+#include <omapip/omapip_p.h>
+
+
+ATF_TC(hash_basic);
+
+ATF_TC_HEAD(hash_basic, tc) {
+    atf_tc_set_md_var(tc, "descr", "Basic hash functions tests");
+}
+
+ATF_TC_BODY(hash_basic, tc) {
+
+}
+
+ATF_TP_ADD_TCS(tp) {
+    ATF_TP_ADD_TC(tp, hash_basic);
+
+    return (atf_no_error());
+}