diff options
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(); |