Skip to content
Snippets Groups Projects
Commit d57e09c6 authored by Lubos Slovak's avatar Lubos Slovak
Browse files

Fixed tests.

Wrong freeing of dname in test_dname_compare().
RDATA test count.
Comparing RDATA in test_rrset_rdata().
All tests count.
parent 51f539fd
Branches
Tags
No related merge requests found
......@@ -221,7 +221,6 @@ static int test_dname_compare()
}
int errors = 0;
int ret = 0;
/* abc < some */
if (dnslib_dname_compare(dnames[0], dnames[1]) != -1) {
diag("Dname comparison error");
......
......@@ -677,7 +677,7 @@ static int test_rdata_to_wire()
/*----------------------------------------------------------------------------*/
static const int DNSLIB_RDATA_TEST_COUNT = 8;
static const int DNSLIB_RDATA_TEST_COUNT = 7;
/*! This helper routine should report number of
* scheduled tests for given parameters.
......
......@@ -230,7 +230,7 @@ static int test_rrset_create()
dnslib_dname_free(&owner);
}
diag("Total errors: %d", errors);
//diag("Total errors: %d", errors);
return (errors == 0);
}
......@@ -293,7 +293,7 @@ static int test_rrset_rdata()
int i = 0;
while (tmp->next!=rrset->rdata && !errors)
{
if (atoi(test_strings[i]) != atoi(tmp->items[0].raw_data)) {
if (strcmp(test_strings[i], (char *)tmp->items[0].raw_data)) {
diag("Adding RDATA error!, is %s should be %s",
tmp->items[0].raw_data, test_strings[i]);
errors++;
......
......@@ -25,7 +25,9 @@ unit_api dnslib_tests_api = {
static int dnslib_tests_count(int argc, char *argv[])
{
return dnslib_dname_tests_count(argc, argv)
+ dnslib_rdata_tests_count(argc, argv);
+ dnslib_rdata_tests_count(argc, argv)
+ dnslib_rrset_tests_count(argc, argv)
+ dnslib_node_tests_count(argc, argv);
}
/*! Run all scheduled tests for given parameters.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment