aboutsummaryrefslogtreecommitdiff
path: root/tests/test-qdev-global-props.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-qdev-global-props.c')
-rw-r--r--tests/test-qdev-global-props.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c
index 1e6b0f33ff..8a3c14d92c 100644
--- a/tests/test-qdev-global-props.c
+++ b/tests/test-qdev-global-props.c
@@ -31,19 +31,20 @@
#define TYPE_STATIC_PROPS "static_prop_type"
-#define STATIC_TYPE(obj) \
- OBJECT_CHECK(MyType, (obj), TYPE_STATIC_PROPS)
+typedef struct MyType MyType;
+DECLARE_INSTANCE_CHECKER(MyType, STATIC_TYPE,
+ TYPE_STATIC_PROPS)
#define TYPE_SUBCLASS "static_prop_subtype"
#define PROP_DEFAULT 100
-typedef struct MyType {
+struct MyType {
DeviceState parent_obj;
uint32_t prop1;
uint32_t prop2;
-} MyType;
+};
static Property static_props[] = {
DEFINE_PROP_UINT32("prop1", MyType, prop1, PROP_DEFAULT),
@@ -127,8 +128,8 @@ static void test_static_globalprop(void)
}
#define TYPE_DYNAMIC_PROPS "dynamic-prop-type"
-#define DYNAMIC_TYPE(obj) \
- OBJECT_CHECK(MyType, (obj), TYPE_DYNAMIC_PROPS)
+DECLARE_INSTANCE_CHECKER(MyType, DYNAMIC_TYPE,
+ TYPE_DYNAMIC_PROPS)
#define TYPE_UNUSED_HOTPLUG "hotplug-type"
#define TYPE_UNUSED_NOHOTPLUG "nohotplug-type"