mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-26 11:44:53 +02:00
review changes.
git-svn-id: file:///svn/unbound/trunk@250 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -211,13 +211,11 @@ main(int argc, char* argv[])
|
||||
}
|
||||
printf("Start of %s unit test.\n", PACKAGE_STRING);
|
||||
checklock_start();
|
||||
/*
|
||||
net_test();
|
||||
alloc_test();
|
||||
msgreply_test();
|
||||
lruhash_test();
|
||||
slabhash_test();
|
||||
*/
|
||||
msgparse_test();
|
||||
checklock_stop();
|
||||
printf("%d tests succeeded\n", testcount);
|
||||
|
||||
@@ -293,7 +293,7 @@ testfromfile(ldns_buffer* pkt, struct alloc_cache* alloc, ldns_buffer* out,
|
||||
perror("fname");
|
||||
return;
|
||||
}
|
||||
while(fgets(buf, sizeof(buf), in)) {
|
||||
while(fgets(buf, (int)sizeof(buf), in)) {
|
||||
if(buf[0] == ';') /* comment */
|
||||
continue;
|
||||
if(strlen(buf) < 10) /* skip pcat line numbers. */
|
||||
@@ -320,6 +320,8 @@ void msgparse_test()
|
||||
printf("testmsgparse\n");
|
||||
simpletest(pkt, &alloc, out);
|
||||
testfromfile(pkt, &alloc, out, "testdata/test_packets.1");
|
||||
testfromfile(pkt, &alloc, out, "testdata/test_packets.2");
|
||||
testfromfile(pkt, &alloc, out, "testdata/test_packets.3");
|
||||
|
||||
/* cleanup */
|
||||
alloc_clear(&alloc);
|
||||
|
||||
Reference in New Issue
Block a user