Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
Suggested-by: Markus Armbruster <arm...@redhat.com>
Reviewed-by: Markus Armbruster <arm...@redhat.com>
---
 tests/check-qdict.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/check-qdict.c b/tests/check-qdict.c
index 5eca1b5449..35405778cc 100644
--- a/tests/check-qdict.c
+++ b/tests/check-qdict.c
@@ -108,10 +108,17 @@ static void qdict_get_try_int_test(void)
     QDict *tests_dict = qdict_new();
 
     qdict_put_int(tests_dict, key, value);
+    qdict_put_str(tests_dict, "string", "test");
 
     ret = qdict_get_try_int(tests_dict, key, 0);
     g_assert(ret == value);
 
+    ret = qdict_get_try_int(tests_dict, "missing", -42);
+    g_assert_cmpuint(ret, ==, -42);
+
+    ret = qdict_get_try_int(tests_dict, "string", -42);
+    g_assert_cmpuint(ret, ==, -42);
+
     QDECREF(tests_dict);
 }
 
-- 
2.13.0.91.g00982b8dd


Reply via email to