diff --git a/configure.ac b/configure.ac index bf2493b5..d82a4872 100644 --- a/configure.ac +++ b/configure.ac @@ -152,7 +152,7 @@ if test -z "$DOXYGEN"; fi # Checks for header files. -AC_CHECK_HEADERS([inttypes.h netinet/in.h stdint.h stdlib.h string.h event2/event.h]) +AC_CHECK_HEADERS([inttypes.h netinet/in.h stdint.h stdlib.h string.h event2/event.h],,, [AC_INCLUDES_DEFAULT]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL diff --git a/src/test/tests_dict.c b/src/test/tests_dict.c index 84883ff0..76e6838b 100644 --- a/src/test/tests_dict.c +++ b/src/test/tests_dict.c @@ -59,26 +59,24 @@ tst_bindatasetget(void) tstmsg_case_msg("getdns_dict_get_bindata() empty dict"); retval = getdns_dict_get_bindata(NULL, key, &ans_bdata); sprintf(msg, - "line %d: getdns_dict_get_bindata(NULL, key, &ans_bdata),retval = %d", - __LINE__, retval); + "test 1: getdns_dict_get_bindata(NULL, key, &ans_bdata),retval = %d", + retval); tstmsg_case_msg(msg); retval = getdns_dict_get_bindata(dict, key, NULL); sprintf(msg, - "line %d: getdns_dict_get_bindata(dict, key, NULL),retval = %d", - __LINE__, retval); + "test 2: getdns_dict_get_bindata(dict, key, NULL),retval = %d", + retval); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_bindata(dict, NULL, &ans_bindata)"); retval = getdns_dict_get_bindata(dict, NULL, &ans_bdata); - sprintf(msg, "line %d: getdns_dict_get_bindata,retval = %d", __LINE__, - retval); + sprintf(msg, "test 3: getdns_dict_get_bindata,retval = %d", retval); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_bindata(dict, key, &ans_bdata)"); retval = getdns_dict_get_bindata(dict, key, &ans_bdata); - sprintf(msg, "line %d: getdns_list_get_bindata,retval = %d", __LINE__, - retval); + sprintf(msg, "test 4: getdns_list_get_bindata,retval = %d", retval); tstmsg_case_msg(msg); getdns_dict_destroy(dict); @@ -97,15 +95,15 @@ tst_bindatasetget(void) tstmsg_case_msg("getdns_dict_set_bindata(dict, key, bindata)"); retval = getdns_dict_set_bindata(dict, key, bindata); - sprintf(msg, "line %d: getdns_dict_set_bindata,retval=%d,key=%s", - __LINE__, retval, key); + sprintf(msg, "test 5: getdns_dict_set_bindata,retval=%d,key=%s", + retval, key); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_bindata(dict, key, &ans_bdata)"); retval = getdns_dict_get_bindata(dict, key, &ans_bdata); sprintf(msg, - "line %d: getdns_dict_get_bindata,retval=%d,key=%s,data=%s", - __LINE__, retval, key, ans_bdata->data); + "test 6: getdns_dict_get_bindata,retval=%d,key=%s,data=%s", + retval, key, ans_bdata->data); tstmsg_case_msg(msg); getdns_dict_destroy(dict); @@ -144,26 +142,24 @@ tst_dictsetget(void) tstmsg_case_msg("getdns_dict_get_dict() empty dict"); retval = getdns_dict_get_dict(NULL, key, &ansdict); sprintf(msg, - "line %d: getdns_dict_get_dict(NULL, key, &ansdict),retval = %d", - __LINE__, retval); + "test 7: getdns_dict_get_dict(NULL, key, &ansdict),retval = %d", + retval); tstmsg_case_msg(msg); retval = getdns_dict_get_dict(dict, key, NULL); sprintf(msg, - "line %d: getdns_dict_get_dict(dict, key, NULL),retval = %d", - __LINE__, retval); + "test 8: getdns_dict_get_dict(dict, key, NULL),retval = %d", + retval); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_dict(dict, NULL, &ansdict)"); retval = getdns_dict_get_dict(dict, NULL, &ansdict); - sprintf(msg, "line %d: getdns_dict_get_dict,retval = %d", __LINE__, - retval); + sprintf(msg, "test 9: getdns_dict_get_dict,retval = %d", retval); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_dict(dict, key, &ansdict)"); retval = getdns_dict_get_dict(dict, key, &ansdict); - sprintf(msg, "line %d: getdns_list_get_dict,retval = %d", __LINE__, - retval); + sprintf(msg, "test 10: getdns_list_get_dict,retval = %d", retval); tstmsg_case_msg(msg); getdns_dict_destroy(dict); @@ -181,8 +177,8 @@ tst_dictsetget(void) tstmsg_case_msg("getdns_dict_set_dict(dict, key, newdict)"); retval = getdns_dict_set_dict(dict, key, newdict); - sprintf(msg, "line %d: getdns_dict_set_dict,retval=%d,key=%s", - __LINE__, retval, key); + sprintf(msg, "test 11: getdns_dict_set_dict,retval=%d,key=%s", retval, + key); tstmsg_case_msg(msg); getdns_dict_destroy(newdict); @@ -191,8 +187,8 @@ tst_dictsetget(void) getdns_dict_get_int(ansdict, "foo", &int1); getdns_dict_get_int(ansdict, "bar", &int2); sprintf(msg, - "line %d: getdns_dict_get_dict,retval=%d,key=%s,int1=%d,int2=%d", - __LINE__, retval, key, int1, int2); + "test 12: getdns_dict_get_dict,retval=%d,key=%s,int1=%d,int2=%d", + retval, key, int1, int2); tstmsg_case_msg(msg); getdns_dict_destroy(dict); @@ -320,26 +316,24 @@ tst_listsetget(void) tstmsg_case_msg("getdns_dict_get_list() empty dict"); retval = getdns_dict_get_list(NULL, key, &anslist); sprintf(msg, - "line %d: getdns_dict_get_list(NULL, key, &anslist),retval = %d", - __LINE__, retval); + "test 13: getdns_dict_get_list(NULL, key, &anslist),retval = %d", + retval); tstmsg_case_msg(msg); retval = getdns_dict_get_list(dict, key, NULL); sprintf(msg, - "line %d: getdns_dict_get_list(dict, key, NULL),retval = %d", - __LINE__, retval); + "test 14: getdns_dict_get_list(dict, key, NULL),retval = %d", + retval); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_list(dict, NULL, &anslist)"); retval = getdns_dict_get_list(dict, NULL, &anslist); - sprintf(msg, "line %d: getdns_dict_get_list,retval = %d", __LINE__, - retval); + sprintf(msg, "test 15: getdns_dict_get_list,retval = %d", retval); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_list(dict, key, &anslist)"); retval = getdns_dict_get_list(dict, key, &anslist); - sprintf(msg, "line %d: getdns_list_get_list,retval = %d", __LINE__, - retval); + sprintf(msg, "test 16: getdns_list_get_list,retval = %d", retval); tstmsg_case_msg(msg); getdns_dict_destroy(dict); @@ -359,8 +353,8 @@ tst_listsetget(void) tstmsg_case_msg("getdns_dict_set_list(dict, key, newlist)"); retval = getdns_dict_set_list(dict, key, newlist); - sprintf(msg, "line %d: getdns_dict_set_list,retval=%d,key=%s", - __LINE__, retval, key); + sprintf(msg, "test 17: getdns_dict_set_list,retval=%d,key=%s", + retval, key); tstmsg_case_msg(msg); getdns_list_destroy(newlist); @@ -369,8 +363,8 @@ tst_listsetget(void) getdns_list_get_int(anslist, 0, &int1); getdns_list_get_int(anslist, 1, &int2); sprintf(msg, - "line %d: getdns_dict_get_list,retval=%d,key=%s,int1=%d,int2=%d", - __LINE__, retval, key, int1, int2); + "test 18: getdns_dict_get_list,retval=%d,key=%s,int1=%d,int2=%d", + retval, key, int1, int2); tstmsg_case_msg(msg); getdns_dict_destroy(dict); @@ -406,26 +400,24 @@ tst_intsetget(void) tstmsg_case_msg("getdns_dict_get_int() empty dict"); retval = getdns_dict_get_int(NULL, key, &ans_int); sprintf(msg, - "line %d: getdns_dict_get_int(NULL, key, &ans_int),retval = %d", - __LINE__, retval); + "test 19: getdns_dict_get_int(NULL, key, &ans_int),retval = %d", + retval); tstmsg_case_msg(msg); retval = getdns_dict_get_int(dict, key, NULL); sprintf(msg, - "line %d: getdns_dict_get_int(dict, key, NULL),retval = %d", - __LINE__, retval); + "test 20: getdns_dict_get_int(dict, key, NULL),retval = %d", + retval); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_int(dict, NULL, &ans_int)"); retval = getdns_dict_get_int(dict, NULL, &ans_int); - sprintf(msg, "line %d: getdns_dict_get_int,retval = %d", __LINE__, - retval); + sprintf(msg, "test 21: getdns_dict_get_int,retval = %d", retval); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_int(dict, key, &ans_int)"); retval = getdns_dict_get_int(dict, key, &ans_int); - sprintf(msg, "line %d: getdns_list_get_int,retval = %d", __LINE__, - retval); + sprintf(msg, "test 22: getdns_list_get_int,retval = %d", retval); tstmsg_case_msg(msg); getdns_dict_destroy(dict); @@ -441,35 +433,35 @@ tst_intsetget(void) tstmsg_case_msg("getdns_dict_set_int(dict, key, newint)"); retval = getdns_dict_set_int(dict, key, newint); - sprintf(msg, "line %d: getdns_dict_set_int,retval=%d,key=%s,int=%d", - __LINE__, retval, key, newint); + sprintf(msg, "test 23: getdns_dict_set_int,retval=%d,key=%s,int=%d", + retval, key, newint); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_int(dict, key, &ans_int)"); retval = getdns_dict_get_int(dict, key, &ans_int); - sprintf(msg, "line %d: getdns_dict_get_int,retval=%d,key=%s,int=%d", - __LINE__, retval, key, ans_int); + sprintf(msg, "test 24: getdns_dict_get_int,retval=%d,key=%s,int=%d", + retval, key, ans_int); tstmsg_case_msg(msg); strcpy(key, "bar"); newint = 52; tstmsg_case_msg("getdns_dict_set_int(dict, key, newint)"); retval = getdns_dict_set_int(dict, key, newint); - sprintf(msg, "line %d: getdns_dict_set_int,retval=%d,key=%s,int=%d", - __LINE__, retval, key, newint); + sprintf(msg, "test 25: getdns_dict_set_int,retval=%d,key=%s,int=%d", + retval, key, newint); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_int(dict, key, &ans_int)"); retval = getdns_dict_get_int(dict, key, &ans_int); - sprintf(msg, "line %d: getdns_dict_get_int,retval=%d,key=%s,int=%d", - __LINE__, retval, key, ans_int); + sprintf(msg, "test 26: getdns_dict_get_int,retval=%d,key=%s,int=%d", + retval, key, ans_int); tstmsg_case_msg(msg); tstmsg_case_msg("getdns_dict_get_data_type(dict, key, &dtype)"); retval = getdns_dict_get_data_type(dict, key, &dtype); sprintf(msg, - "line %d: getdns_dict_get_data_type,retval=%d,key=%s,dtype=%d", - __LINE__, retval, key, dtype); + "test 27: getdns_dict_get_data_type,retval=%d,key=%s,dtype=%d", + retval, key, dtype); tstmsg_case_msg(msg); getdns_dict_destroy(dict); diff --git a/src/test/tests_dict.good b/src/test/tests_dict.good index 4ea6186c..f7be44a1 100644 --- a/src/test/tests_dict.good +++ b/src/test/tests_dict.good @@ -6,61 +6,61 @@ TESTCASE tests_dict:tst_create BEGIN TESTCASE tests_dict:tst_create END TESTCASE tests_dict:tst_bindatasetget BEGIN tests_dict:tst_bindatasetget: getdns_dict_get_bindata() empty dict - tests_dict:tst_bindatasetget: line 63: getdns_dict_get_bindata(NULL, key, &ans_bdata),retval = 305 - tests_dict:tst_bindatasetget: line 69: getdns_dict_get_bindata(dict, key, NULL),retval = 305 + tests_dict:tst_bindatasetget: test 1: getdns_dict_get_bindata(NULL, key, &ans_bdata),retval = 305 + tests_dict:tst_bindatasetget: test 2: getdns_dict_get_bindata(dict, key, NULL),retval = 305 tests_dict:tst_bindatasetget: getdns_dict_get_bindata(dict, NULL, &ans_bindata) - tests_dict:tst_bindatasetget: line 74: getdns_dict_get_bindata,retval = 305 + tests_dict:tst_bindatasetget: test 3: getdns_dict_get_bindata,retval = 305 tests_dict:tst_bindatasetget: getdns_dict_get_bindata(dict, key, &ans_bdata) - tests_dict:tst_bindatasetget: line 80: getdns_list_get_bindata,retval = 306 + tests_dict:tst_bindatasetget: test 4: getdns_list_get_bindata,retval = 306 tests_dict:tst_bindatasetget: getdns_dict_set_bindata(dict, key, bindata) - tests_dict:tst_bindatasetget: line 101: getdns_dict_set_bindata,retval=0,key=foo + tests_dict:tst_bindatasetget: test 5: getdns_dict_set_bindata,retval=0,key=foo tests_dict:tst_bindatasetget: getdns_dict_get_bindata(dict, key, &ans_bdata) - tests_dict:tst_bindatasetget: line 108: getdns_dict_get_bindata,retval=0,key=foo,data=foobar + tests_dict:tst_bindatasetget: test 6: getdns_dict_get_bindata,retval=0,key=foo,data=foobar TESTCASE tests_dict:tst_bindatasetget END TESTCASE tests_dict:tst_dictsetget BEGIN tests_dict:tst_dictsetget: getdns_dict_get_dict() empty dict - tests_dict:tst_dictsetget: line 148: getdns_dict_get_dict(NULL, key, &ansdict),retval = 305 - tests_dict:tst_dictsetget: line 154: getdns_dict_get_dict(dict, key, NULL),retval = 305 + tests_dict:tst_dictsetget: test 7: getdns_dict_get_dict(NULL, key, &ansdict),retval = 305 + tests_dict:tst_dictsetget: test 8: getdns_dict_get_dict(dict, key, NULL),retval = 305 tests_dict:tst_dictsetget: getdns_dict_get_dict(dict, NULL, &ansdict) - tests_dict:tst_dictsetget: line 159: getdns_dict_get_dict,retval = 305 + tests_dict:tst_dictsetget: test 9: getdns_dict_get_dict,retval = 305 tests_dict:tst_dictsetget: getdns_dict_get_dict(dict, key, &ansdict) - tests_dict:tst_dictsetget: line 165: getdns_list_get_dict,retval = 305 + tests_dict:tst_dictsetget: test 10: getdns_list_get_dict,retval = 305 tests_dict:tst_dictsetget: getdns_dict_set_dict(dict, key, newdict) - tests_dict:tst_dictsetget: line 185: getdns_dict_set_dict,retval=0,key=foo + tests_dict:tst_dictsetget: test 11: getdns_dict_set_dict,retval=0,key=foo tests_dict:tst_dictsetget: getdns_dict_get_dict(dict, key, &ansdict) - tests_dict:tst_dictsetget: line 195: getdns_dict_get_dict,retval=0,key=foo,int1=42,int2=52 + tests_dict:tst_dictsetget: test 12: getdns_dict_get_dict,retval=0,key=foo,int1=42,int2=52 TESTCASE tests_dict:tst_dictsetget END TESTCASE tests_dict:tst_intsetget BEGIN tests_dict:tst_intsetget: getdns_dict_get_int() empty dict - tests_dict:tst_intsetget: line 410: getdns_dict_get_int(NULL, key, &ans_int),retval = 305 - tests_dict:tst_intsetget: line 416: getdns_dict_get_int(dict, key, NULL),retval = 305 + tests_dict:tst_intsetget: test 19: getdns_dict_get_int(NULL, key, &ans_int),retval = 305 + tests_dict:tst_intsetget: test 20: getdns_dict_get_int(dict, key, NULL),retval = 305 tests_dict:tst_intsetget: getdns_dict_get_int(dict, NULL, &ans_int) - tests_dict:tst_intsetget: line 421: getdns_dict_get_int,retval = 305 + tests_dict:tst_intsetget: test 21: getdns_dict_get_int,retval = 305 tests_dict:tst_intsetget: getdns_dict_get_int(dict, key, &ans_int) - tests_dict:tst_intsetget: line 427: getdns_list_get_int,retval = 306 + tests_dict:tst_intsetget: test 22: getdns_list_get_int,retval = 306 tests_dict:tst_intsetget: getdns_dict_set_int(dict, key, newint) - tests_dict:tst_intsetget: line 445: getdns_dict_set_int,retval=0,key=foo,int=42 + tests_dict:tst_intsetget: test 23: getdns_dict_set_int,retval=0,key=foo,int=42 tests_dict:tst_intsetget: getdns_dict_get_int(dict, key, &ans_int) - tests_dict:tst_intsetget: line 451: getdns_dict_get_int,retval=0,key=foo,int=42 + tests_dict:tst_intsetget: test 24: getdns_dict_get_int,retval=0,key=foo,int=42 tests_dict:tst_intsetget: getdns_dict_set_int(dict, key, newint) - tests_dict:tst_intsetget: line 459: getdns_dict_set_int,retval=0,key=bar,int=52 + tests_dict:tst_intsetget: test 25: getdns_dict_set_int,retval=0,key=bar,int=52 tests_dict:tst_intsetget: getdns_dict_get_int(dict, key, &ans_int) - tests_dict:tst_intsetget: line 465: getdns_dict_get_int,retval=0,key=bar,int=52 + tests_dict:tst_intsetget: test 26: getdns_dict_get_int,retval=0,key=bar,int=52 tests_dict:tst_intsetget: getdns_dict_get_data_type(dict, key, &dtype) - tests_dict:tst_intsetget: line 472: getdns_dict_get_data_type,retval=0,key=bar,dtype=2 + tests_dict:tst_intsetget: test 27: getdns_dict_get_data_type,retval=0,key=bar,dtype=2 TESTCASE tests_dict:tst_intsetget END TESTCASE tests_dict:tst_listsetget BEGIN tests_dict:tst_listsetget: getdns_dict_get_list() empty dict - tests_dict:tst_listsetget: line 324: getdns_dict_get_list(NULL, key, &anslist),retval = 305 - tests_dict:tst_listsetget: line 330: getdns_dict_get_list(dict, key, NULL),retval = 305 + tests_dict:tst_listsetget: test 13: getdns_dict_get_list(NULL, key, &anslist),retval = 305 + tests_dict:tst_listsetget: test 14: getdns_dict_get_list(dict, key, NULL),retval = 305 tests_dict:tst_listsetget: getdns_dict_get_list(dict, NULL, &anslist) - tests_dict:tst_listsetget: line 335: getdns_dict_get_list,retval = 305 + tests_dict:tst_listsetget: test 15: getdns_dict_get_list,retval = 305 tests_dict:tst_listsetget: getdns_dict_get_list(dict, key, &anslist) - tests_dict:tst_listsetget: line 341: getdns_list_get_list,retval = 306 + tests_dict:tst_listsetget: test 16: getdns_list_get_list,retval = 306 tests_dict:tst_listsetget: getdns_dict_set_list(dict, key, newlist) - tests_dict:tst_listsetget: line 363: getdns_dict_set_list,retval=0,key=foo + tests_dict:tst_listsetget: test 17: getdns_dict_set_list,retval=0,key=foo tests_dict:tst_listsetget: getdns_dict_get_list(dict, key, &anslist) - tests_dict:tst_listsetget: line 373: getdns_dict_get_list,retval=0,key=foo,int1=42,int2=52 + tests_dict:tst_listsetget: test 18: getdns_dict_get_list,retval=0,key=foo,int1=42,int2=52 TESTCASE tests_dict:tst_listsetget END TESTCASE tests_dict:tst_getnames BEGIN tests_dict:tst_getnames: getdns_dict_get_names(NULL, &list)