From 854c2d80f1cf5c567a602ce25f8fd7e166bc4c2f Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Fri, 1 Sep 2023 10:26:07 +0200 Subject: Improvement for reducing false positives --- example/ndpiReader.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 65c07d2bc..bd5f989b1 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -5473,6 +5473,19 @@ void domainSearchUnitTest() { /* *********************************************** */ +void domainSearchUnitTest2() { + ndpi_domain_classify *c = ndpi_domain_classify_alloc(); + u_int16_t class_id = 9; + + ndpi_domain_classify_add(c, class_id, "ntop.org"); + ndpi_domain_classify_add(c, class_id, "apple.com"); + + assert(ndpi_domain_classify_contains(c,"ntop.com") == 0); + ndpi_domain_classify_free(c); +} + +/* *********************************************** */ + /** @brief MAIN FUNCTION **/ @@ -5513,6 +5526,7 @@ int main(int argc, char **argv) { #endif domainSearchUnitTest(); + domainSearchUnitTest2(); sketchUnitTest(); linearUnitTest(); zscoreUnitTest(); -- cgit v1.2.3