unbound 0.1
unitmain.h File Reference

Declarations useful for the unit tests. More...

#include "util/log.h"

Macros

#define unit_assert(x)
 test bool x, exits on failure, increases testcount.
 

Functions

void unit_show_func (const char *file, const char *func)
 we are now testing this function
 
void unit_show_feature (const char *feature)
 we are testing this functionality
 
void lruhash_test (void)
 unit test lruhashtable implementation
 
void slabhash_test (void)
 unit test slabhashtable implementation
 
void msgparse_test (void)
 unit test for msgreply and msgparse
 
void dname_test (void)
 unit test dname handling functions
 
void anchors_test (void)
 unit test trust anchor storage functions
 
void verify_test (void)
 unit test for verification functions
 
void neg_test (void)
 unit test for negative cache functions
 
void regional_test (void)
 unit test for regional allocator functions
 
void ldns_test (void)
 unit test for ldns functions
 
void authzone_test (void)
 unit test for auth zone functions
 
void zonemd_test (void)
 unit test for zonemd functions
 
void tcpreuse_test (void)
 unit test for tcp_reuse functions
 

Variables

int testcount
 number of tests done
 

Detailed Description

Declarations useful for the unit tests.

Macro Definition Documentation

◆ unit_assert

#define unit_assert ( x)
Value:
do {testcount++; if(!(x)) { fprintf(stderr, "assertion failure %s:%d\n", __FILE__, __LINE__); exit(1);}} while(0)
int testcount
number of tests done
Definition unitmain.c:70

test bool x, exits on failure, increases testcount.

Referenced by add_item(), alloc_test(), anchors_test(), authzone_compare_serial(), b64_test(), buf_to_hex(), burden_test(), cfg_insert_respip_data(), check_data(), check_lru(), check_lru_table(), check_neg_invariants(), check_read_exact(), check_reuse_write_wait_removal(), check_snip(), check_table(), check_the_rrsigs(), check_tree_and_list(), check_waiting_tcp_removal(), check_zone_invariants(), checkfile(), checkformerr(), config_memsize_test(), config_tag_test(), corner_cases(), dname_test(), dname_test_canoncmp(), dname_test_count_labels(), dname_test_count_size_labels(), dname_test_dname_lab_cmp(), dname_test_has_label(), dname_test_isroot(), dname_test_iswild(), dname_test_pkt_dname_len(), dname_test_qdl(), dname_test_qdtl(), dname_test_query_dname_compare(), dname_test_removelabel(), dname_test_sigcount(), dname_test_strict_subdomain(), dname_test_subdomain(), dname_test_topdomain(), dname_test_valid(), dstest_entry(), dstest_file(), edns_ede_answer_encode_test(), entry_to_buf(), entry_to_repinfo(), extract_keys(), infra_test(), neg_test(), net_test(), nsec3_hash_test(), nsec3_hash_test_entry(), nsectest(), perf_encode(), perftestpkt(), q_ans_query(), respip_conf_actions_test(), respip_conf_data_test(), respip_view_conf_actions_test(), respip_view_conf_data_test(), reuse_write_wait_clear(), rnd_test(), rr_checks(), rr_transform(), rtt_test(), specific_cases(), stress_test(), tcpid_addmore(), test_anchor_empty(), test_anchor_one(), test_anchors(), test_bin_find_entry(), test_buffers(), test_long_table(), test_long_table(), test_lru(), test_short_table(), test_short_table(), test_thr_main(), test_thr_main(), testlookup(), testlookup(), testlookup_unlim(), testlookup_unlim(), testpkt(), verify_respip_set_actions(), verify_rrset(), verifytest_file(), verifytest_rrset(), waiting_tcp_list_clear(), zonemd_check_test(), zonemd_generate_test(), and zonemd_verify_test().

Function Documentation

◆ authzone_test()

void authzone_test ( void )

unit test for auth zone functions

unit test for auth zone functions

References authzone_compare_serial(), authzone_query_test(), authzone_read_test(), tmpfilecleanup(), and unit_show_feature().

Referenced by main().

◆ zonemd_test()

void zonemd_test ( void )

unit test for zonemd functions

unit test for zonemd functions

References unit_show_feature(), zonemd_check_test(), zonemd_generate_tests(), and zonemd_verify_tests().

Referenced by main().