Lines Matching full:dict
293 QDict *dict; in test_qemu_opt_get_size() local
313 dict = qdict_new(); in test_qemu_opt_get_size()
314 g_assert(dict != NULL); in test_qemu_opt_get_size()
316 qdict_put_str(dict, "size1", "10"); in test_qemu_opt_get_size()
318 qemu_opts_absorb_qdict(opts, dict, &error_abort); in test_qemu_opt_get_size()
326 qdict_put_str(dict, "size1", "15"); in test_qemu_opt_get_size()
328 qemu_opts_absorb_qdict(opts, dict, &error_abort); in test_qemu_opt_get_size()
335 qdict_del(dict, "size1"); in test_qemu_opt_get_size()
336 g_free(dict); in test_qemu_opt_get_size()
878 QDict *dict; in test_opts_to_qdict_basic() local
884 dict = qemu_opts_to_qdict(opts, NULL); in test_opts_to_qdict_basic()
885 g_assert(dict != NULL); in test_opts_to_qdict_basic()
887 g_assert_cmpstr(qdict_get_str(dict, "str1"), ==, "foo"); in test_opts_to_qdict_basic()
888 g_assert_cmpstr(qdict_get_str(dict, "str2"), ==, ""); in test_opts_to_qdict_basic()
889 g_assert_cmpstr(qdict_get_str(dict, "str3"), ==, "bar"); in test_opts_to_qdict_basic()
890 g_assert_cmpstr(qdict_get_str(dict, "number1"), ==, "42"); in test_opts_to_qdict_basic()
891 g_assert_false(qdict_haskey(dict, "number2")); in test_opts_to_qdict_basic()
893 qobject_unref(dict); in test_opts_to_qdict_basic()
901 QDict *dict; in test_opts_to_qdict_filtered() local
912 dict = qemu_opts_to_qdict_filtered(opts, NULL, &opts_list_01, false); in test_opts_to_qdict_filtered()
913 g_assert(dict != NULL); in test_opts_to_qdict_filtered()
914 g_assert_cmpstr(qdict_get_str(dict, "str1"), ==, "foo"); in test_opts_to_qdict_filtered()
915 g_assert_cmpstr(qdict_get_str(dict, "str2"), ==, ""); in test_opts_to_qdict_filtered()
916 g_assert_cmpstr(qdict_get_str(dict, "str3"), ==, "bar"); in test_opts_to_qdict_filtered()
917 g_assert_cmpstr(qdict_get_str(dict, "number1"), ==, "42"); in test_opts_to_qdict_filtered()
918 g_assert_false(qdict_haskey(dict, "number2")); in test_opts_to_qdict_filtered()
919 g_assert_false(qdict_haskey(dict, "bool1")); in test_opts_to_qdict_filtered()
920 qobject_unref(dict); in test_opts_to_qdict_filtered()
922 dict = qemu_opts_to_qdict_filtered(opts, NULL, &opts_list_02, false); in test_opts_to_qdict_filtered()
923 g_assert(dict != NULL); in test_opts_to_qdict_filtered()
924 g_assert_cmpstr(qdict_get_str(dict, "str1"), ==, "foo"); in test_opts_to_qdict_filtered()
925 g_assert_cmpstr(qdict_get_str(dict, "str2"), ==, ""); in test_opts_to_qdict_filtered()
926 g_assert_cmpstr(qdict_get_str(dict, "bool1"), ==, "off"); in test_opts_to_qdict_filtered()
927 g_assert_false(qdict_haskey(dict, "str3")); in test_opts_to_qdict_filtered()
928 g_assert_false(qdict_haskey(dict, "number1")); in test_opts_to_qdict_filtered()
929 g_assert_false(qdict_haskey(dict, "number2")); in test_opts_to_qdict_filtered()
930 qobject_unref(dict); in test_opts_to_qdict_filtered()
933 dict = qemu_opts_to_qdict_filtered(opts, NULL, &opts_list_01, true); in test_opts_to_qdict_filtered()
934 g_assert(dict != NULL); in test_opts_to_qdict_filtered()
935 g_assert_cmpstr(qdict_get_str(dict, "str1"), ==, "foo"); in test_opts_to_qdict_filtered()
936 g_assert_cmpstr(qdict_get_str(dict, "str2"), ==, ""); in test_opts_to_qdict_filtered()
937 g_assert_cmpstr(qdict_get_str(dict, "str3"), ==, "bar"); in test_opts_to_qdict_filtered()
938 g_assert_cmpstr(qdict_get_str(dict, "number1"), ==, "42"); in test_opts_to_qdict_filtered()
939 g_assert_false(qdict_haskey(dict, "number2")); in test_opts_to_qdict_filtered()
940 g_assert_false(qdict_haskey(dict, "bool1")); in test_opts_to_qdict_filtered()
941 qobject_unref(dict); in test_opts_to_qdict_filtered()
943 dict = qemu_opts_to_qdict_filtered(opts, NULL, &opts_list_02, true); in test_opts_to_qdict_filtered()
944 g_assert(dict != NULL); in test_opts_to_qdict_filtered()
945 g_assert_cmpstr(qdict_get_str(dict, "bool1"), ==, "off"); in test_opts_to_qdict_filtered()
946 g_assert_false(qdict_haskey(dict, "str1")); in test_opts_to_qdict_filtered()
947 g_assert_false(qdict_haskey(dict, "str2")); in test_opts_to_qdict_filtered()
948 g_assert_false(qdict_haskey(dict, "str3")); in test_opts_to_qdict_filtered()
949 g_assert_false(qdict_haskey(dict, "number1")); in test_opts_to_qdict_filtered()
950 g_assert_false(qdict_haskey(dict, "number2")); in test_opts_to_qdict_filtered()
951 qobject_unref(dict); in test_opts_to_qdict_filtered()
963 QDict *dict; in test_opts_to_qdict_duplicates() local
981 dict = qemu_opts_to_qdict(opts, NULL); in test_opts_to_qdict_duplicates()
982 g_assert(dict != NULL); in test_opts_to_qdict_duplicates()
983 g_assert_cmpstr(qdict_get_str(dict, "foo"), ==, "b"); in test_opts_to_qdict_duplicates()
984 qobject_unref(dict); in test_opts_to_qdict_duplicates()
987 dict = qemu_opts_to_qdict_filtered(opts, NULL, NULL, true); in test_opts_to_qdict_duplicates()
988 g_assert(dict != NULL); in test_opts_to_qdict_duplicates()
989 g_assert_cmpstr(qdict_get_str(dict, "foo"), ==, "b"); in test_opts_to_qdict_duplicates()
990 qobject_unref(dict); in test_opts_to_qdict_duplicates()