UNITTEST_SRC=testcode/unitanchor.c testcode/unitdname.c \
testcode/unitlruhash.c testcode/unitmain.c testcode/unitmsgparse.c \
testcode/unitneg.c testcode/unitregional.c testcode/unitslabhash.c \
-testcode/unitverify.c testcode/readhex.c testcode/ldns-testpkts.c
+testcode/unitverify.c testcode/readhex.c testcode/ldns-testpkts.c \
+testcode/unitvandergaast.c
UNITTEST_OBJ=unitanchor.lo unitdname.lo unitlruhash.lo unitmain.lo \
unitmsgparse.lo unitneg.lo unitregional.lo unitslabhash.lo unitverify.lo \
-readhex.lo ldns-testpkts.lo
+readhex.lo ldns-testpkts.lo unitvandergaast.lo
UNITTEST_OBJ_LINK=$(UNITTEST_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ)
DAEMON_SRC=daemon/acl_list.c daemon/cachedump.c daemon/daemon.c \
daemon/remote.c daemon/stats.c daemon/unbound.c daemon/worker.c @WIN_DAEMON_SRC@
$(srcdir)/util/locks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \
$(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \
$(srcdir)/util/net_help.h $(srcdir)/testcode/readhex.h
+unitvandergaast.lo unitvandergaast.o: $(srcdir)/testcode/unitvandergaast.c \
+ config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h
unitneg.lo unitneg.o: $(srcdir)/testcode/unitneg.c config.h $(srcdir)/util/log.h \
$(srcdir)/util/net_help.h \
$(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \
node = edge->node;
}
}
+
+/** Wrappers for static functions to unit test */
+int unittest_wrapper_addrtree_cmpbit(const addrkey_t* key1,
+ const addrkey_t* key2, addrlen_t n) {
+ return cmpbit(key1, key2, n);
+}
+addrlen_t unittest_wrapper_addrtree_bits_common(const addrkey_t* s1,
+ addrlen_t l1, const addrkey_t* s2, addrlen_t l2, addrlen_t skip) {
+ return bits_common(s1, l1, s2, l2, skip);
+}
+
+
+//~ static struct addredge* edge_create(struct addrnode* node, const addrkey_t* addr, addrlen_t addrlen)
+//~ static struct addrnode* node_create(struct reply_info* elem, addrlen_t scope)
+//~ static void freenode_recursive(struct addrtree* tree, struct addrnode* node)
+//~ static int issub(const addrkey_t* s1, addrlen_t l1, const addrkey_t* s2, addrlen_t l2, addrlen_t skip)
struct addrnode* addrtree_find(const struct addrtree* tree,
const addrkey_t* addr, addrlen_t sourcemask);
+/** Wrappers for static functions to unit test */
+int unittest_wrapper_addrtree_cmpbit(const addrkey_t* key1,
+ const addrkey_t* key2, addrlen_t n);
+addrlen_t unittest_wrapper_addrtree_bits_common(const addrkey_t* s1,
+ addrlen_t l1, const addrkey_t* s2, addrlen_t l2, addrlen_t skip);
#endif /* ADDRTREE_H */
slabhash_test();
infra_test();
msgparse_test();
+ vandergaast_test();
checklock_stop();
printf("%d checks ok.\n", testcount);
#ifdef HAVE_SSL
void neg_test(void);
/** unit test for regional allocator functions */
void regional_test(void);
-
+#ifdef CLIENT_SUBNET
+/** - */
+void vandergaast_test(void);
+#endif /* CLIENT_SUBNET */
#endif /* TESTCODE_UNITMAIN_H */