unbound: testcode/unitmain.h File Reference

unbound 0.1

Macros | Functions | Variables
unitmain.h File Reference

Declarations useful for the unit tests. More...

`#include "util/log.h"`

## Macros
#define | unit_assert(x) do {testcount++; if(!(x)) { fprintf(stderr, "assertion failure %s:%d\n", __FILE__, __LINE__); exit(1);}} while(0)
| 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.

## 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().