diff options
author | Luca Deri <deri@ntop.org> | 2023-09-01 10:26:07 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2023-09-01 10:26:07 +0200 |
commit | 854c2d80f1cf5c567a602ce25f8fd7e166bc4c2f (patch) | |
tree | 10184f62084900baf02a1f4d3fcabf723c651fbf /example/ndpiReader.c | |
parent | 74fdac7d77a933f6b8ef894d1f2fbd3c9052fdcb (diff) |
Improvement for reducing false positives
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 14 |
1 files changed, 14 insertions, 0 deletions
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(); |