From 94b5c956766a3f1ee916f2bb946c3d9273c90ae1 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 10 Jul 2015 10:48:26 +0100 Subject: Add unit test for bloom filter Adds check based unit test for teh bloom filter implementation. This is based on Roberts original test code in utils/bloom.c and uses /usr/share/dict as a source of strings to check bloom creation, no false negatives and the false positive rate is below 15%. --- test/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/Makefile') diff --git a/test/Makefile b/test/Makefile index 9db5030b5..06f6943cc 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,7 +1,7 @@ # # NetSurf unit tests -TESTS := nsurl urldbtest nsoption #llcache +TESTS := nsurl urldbtest nsoption bloom #llcache # nsurl sources and flags nsurl_SRCS := utils/corestrings.c utils/nsurl.c utils/idna.c \ @@ -28,7 +28,8 @@ llcache_SRCS := content/fetch.c content/fetchers/curl.c \ nsoption_SRCS := utils/nsoption.c \ test/log.c test/nsoption.c - +bloom_SRCS := utils/bloom.c \ + test/bloom.c # Coverage builds need additional flags ifeq ($(MAKECMDGOALS),coverage) -- cgit v1.2.3