]> Git Repo - qemu.git/blobdiff - tests/test-qdev-global-props.c
hw/machine: Free old values of string properties
[qemu.git] / tests / test-qdev-global-props.c
index e4ad173d72732799f0b6eaf5cd4c604d249a3e30..2bef04c76f9556bd335ce6caacc8ff35aeb49844 100644 (file)
@@ -150,8 +150,10 @@ static void test_dynamic_globalprop(void)
     static GlobalProperty props[] = {
         { TYPE_DYNAMIC_PROPS, "prop1", "101" },
         { TYPE_DYNAMIC_PROPS, "prop2", "102" },
     static GlobalProperty props[] = {
         { TYPE_DYNAMIC_PROPS, "prop1", "101" },
         { TYPE_DYNAMIC_PROPS, "prop2", "102" },
+        { TYPE_DYNAMIC_PROPS"-bad", "prop3", "103", true },
         {}
     };
         {}
     };
+    int all_used;
 
     qdev_prop_register_global_list(props);
 
 
     qdev_prop_register_global_list(props);
 
@@ -160,6 +162,8 @@ static void test_dynamic_globalprop(void)
 
     g_assert_cmpuint(mt->prop1, ==, 101);
     g_assert_cmpuint(mt->prop2, ==, 102);
 
     g_assert_cmpuint(mt->prop1, ==, 101);
     g_assert_cmpuint(mt->prop2, ==, 102);
+    all_used = qdev_prop_check_global();
+    g_assert_cmpuint(all_used, ==, 1);
 }
 
 int main(int argc, char **argv)
 }
 
 int main(int argc, char **argv)
This page took 0.024456 seconds and 4 git commands to generate.