From: Tomek Mrugalski Date: Fri, 29 Jun 2012 15:06:21 +0000 (+0200) Subject: [25901_atf] Skeleton for hash tests added. X-Git-Tag: v4_3_0a1~77^2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3d7118fd1222bbb102bf8f7c310c39ec6f4817d;p=thirdparty%2Fdhcp.git [25901_atf] Skeleton for hash tests added. --- diff --git a/common/tests/Atffile b/common/tests/Atffile new file mode 100644 index 000000000..14b1055be --- /dev/null +++ b/common/tests/Atffile @@ -0,0 +1,7 @@ +Content-Type: application/X-atf-atffile; version="1" + +prop: test-suite = dhcp4 + +tp-glob: test_alloc +tp-glob: hash_unittest + diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am index dd55e4fb8..a073c357a 100644 --- a/common/tests/Makefile.am +++ b/common/tests/Makefile.am @@ -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 index 000000000..fcc1feb9f --- /dev/null +++ b/common/tests/hash_unittest.c @@ -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 + * + * https://www.isc.org/ + * + */ + +#include "config.h" +#include +#include + + +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()); +}