1TESTPROG tests_dict START
2TESTCASE tests_dict:tst_create BEGIN
3  tests_dict:tst_create: getdns_dict_create
4  tests_dict:tst_create: getdns_dict_destroy(dict)
5  tests_dict:tst_create: getdns_dict_destroy(NULL)
6TESTCASE tests_dict:tst_create END
7TESTCASE tests_dict:tst_bindatasetget BEGIN
8  tests_dict:tst_bindatasetget: getdns_dict_get_bindata() empty dict
9  tests_dict:tst_bindatasetget: test 1: getdns_dict_get_bindata(NULL, key, &ans_bdata),retval = 311
10  tests_dict:tst_bindatasetget: test 2: getdns_dict_get_bindata(dict, key, NULL),retval = 311
11  tests_dict:tst_bindatasetget: getdns_dict_get_bindata(dict, NULL, &ans_bindata)
12  tests_dict:tst_bindatasetget: test 3: getdns_dict_get_bindata,retval = 311
13  tests_dict:tst_bindatasetget: getdns_dict_get_bindata(dict, key, &ans_bdata)
14  tests_dict:tst_bindatasetget: test 4: getdns_list_get_bindata,retval = 305
15  tests_dict:tst_bindatasetget: getdns_dict_set_bindata(dict, key, bindata)
16  tests_dict:tst_bindatasetget: test 5: getdns_dict_set_bindata,retval=0,key=foo
17  tests_dict:tst_bindatasetget: getdns_dict_get_bindata(dict, key, &ans_bdata)
18  tests_dict:tst_bindatasetget: test 6: getdns_dict_get_bindata,retval=0,key=foo,data=foobar
19TESTCASE tests_dict:tst_bindatasetget END
20TESTCASE tests_dict:tst_dictsetget BEGIN
21  tests_dict:tst_dictsetget: getdns_dict_get_dict() empty dict
22  tests_dict:tst_dictsetget: test 7: getdns_dict_get_dict(NULL, key, &ansdict),retval = 311
23  tests_dict:tst_dictsetget: test 8: getdns_dict_get_dict(dict, key, NULL),retval = 311
24  tests_dict:tst_dictsetget: getdns_dict_get_dict(dict, NULL, &ansdict)
25  tests_dict:tst_dictsetget: test 9: getdns_dict_get_dict,retval = 311
26  tests_dict:tst_dictsetget: getdns_dict_get_dict(dict, key, &ansdict)
27  tests_dict:tst_dictsetget: test 10: getdns_list_get_dict,retval = 305
28  tests_dict:tst_dictsetget: getdns_dict_set_dict(dict, key, newdict)
29  tests_dict:tst_dictsetget: test 11: getdns_dict_set_dict,retval=0,key=foo
30  tests_dict:tst_dictsetget: getdns_dict_get_dict(dict, key, &ansdict)
31  tests_dict:tst_dictsetget: test 12: getdns_dict_get_dict,retval=0,key=foo,int1=42,int2=52
32TESTCASE tests_dict:tst_dictsetget END
33TESTCASE tests_dict:tst_intsetget BEGIN
34  tests_dict:tst_intsetget: getdns_dict_get_int() empty dict
35  tests_dict:tst_intsetget: test 19: getdns_dict_get_int(NULL, key, &ans_int),retval = 311
36  tests_dict:tst_intsetget: test 20: getdns_dict_get_int(dict, key, NULL),retval = 311
37  tests_dict:tst_intsetget: getdns_dict_get_int(dict, NULL, &ans_int)
38  tests_dict:tst_intsetget: test 21: getdns_dict_get_int,retval = 311
39  tests_dict:tst_intsetget: getdns_dict_get_int(dict, key, &ans_int)
40  tests_dict:tst_intsetget: test 22: getdns_list_get_int,retval = 305
41  tests_dict:tst_intsetget: getdns_dict_set_int(dict, key, newint)
42  tests_dict:tst_intsetget: test 23: getdns_dict_set_int,retval=0,key=foo,int=42
43  tests_dict:tst_intsetget: getdns_dict_get_int(dict, key, &ans_int)
44  tests_dict:tst_intsetget: test 24: getdns_dict_get_int,retval=0,key=foo,int=42
45  tests_dict:tst_intsetget: getdns_dict_set_int(dict, key, newint)
46  tests_dict:tst_intsetget: test 25: getdns_dict_set_int,retval=0,key=bar,int=52
47  tests_dict:tst_intsetget: getdns_dict_get_int(dict, key, &ans_int)
48  tests_dict:tst_intsetget: test 26: getdns_dict_get_int,retval=0,key=bar,int=52
49  tests_dict:tst_intsetget: getdns_dict_get_data_type(dict, key, &dtype)
50  tests_dict:tst_intsetget: test 27: getdns_dict_get_data_type,retval=0,key=bar,dtype=2
51TESTCASE tests_dict:tst_intsetget END
52TESTCASE tests_dict:tst_listsetget BEGIN
53  tests_dict:tst_listsetget: getdns_dict_get_list() empty dict
54  tests_dict:tst_listsetget: test 13: getdns_dict_get_list(NULL, key, &anslist),retval = 311
55  tests_dict:tst_listsetget: test 14: getdns_dict_get_list(dict, key, NULL),retval = 311
56  tests_dict:tst_listsetget: getdns_dict_get_list(dict, NULL, &anslist)
57  tests_dict:tst_listsetget: test 15: getdns_dict_get_list,retval = 311
58  tests_dict:tst_listsetget: getdns_dict_get_list(dict, key, &anslist)
59  tests_dict:tst_listsetget: test 16: getdns_list_get_list,retval = 305
60  tests_dict:tst_listsetget: getdns_dict_set_list(dict, key, newlist)
61  tests_dict:tst_listsetget: test 17: getdns_dict_set_list,retval=0,key=foo
62  tests_dict:tst_listsetget: getdns_dict_get_list(dict, key, &anslist)
63  tests_dict:tst_listsetget: test 18: getdns_dict_get_list,retval=0,key=foo,int1=42,int2=52
64TESTCASE tests_dict:tst_listsetget END
65TESTCASE tests_dict:tst_getnames BEGIN
66  tests_dict:tst_getnames: getdns_dict_get_names(NULL, &list)
67  tests_dict:tst_getnames: getdns_dict_get_names(dict, NULL)
68  tests_dict:tst_getnames: getdns_dict_get_names(dict, &list), empty dictionary
69    list item 0: NOTIMPLEMENTED    list item 1: NOTIMPLEMENTED    list item 2: NOTIMPLEMENTED    list item 3: NOTIMPLEMENTEDTESTCASE tests_dict:tst_getnames END
70TESTCASE tests_dict:tst_copy BEGIN
71  tests_dict:tst_copy: empty list cases
72  tests_dict:tst_copy: dict1 populate
73{
74  "bar": 52,
75  "foo": 42,
76  "quz": 62
77}
78  tests_dict:tst_copy: getdns_dict_copy(dict1, &dict2)
79{
80  "bar": 52,
81  "foo": 42,
82  "quz": 62
83}
84TESTCASE tests_dict:tst_copy END
85TESTPROG tests_dict END
86