]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests/qapi-schema: Cover forward reference to sub-module
authorMarkus Armbruster <armbru@redhat.com>
Fri, 1 Mar 2019 15:40:50 +0000 (16:40 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 5 Mar 2019 13:43:11 +0000 (14:43 +0100)
The forward reference from the main module to the sub-module works
fine, except for an issue visible in qapi-schema-test.out: the array
type wrapped around the forward reference ends up in the main module,
not the sub-module.  The next commit will explain why that's bad, and
fix it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190301154051.23317-7-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/qapi-schema/qapi-schema-test.json
tests/qapi-schema/qapi-schema-test.out

index 908f7180275007cb9a726286d0bb25a5d1db7ddd..0952c68734ffcae369d297afa9097aac80b17ae3 100644 (file)
             'boolean': ['bool'],
             'string': ['str'],
             'sizes': ['size'],
-            'any': ['any'] } }
+            'any': ['any'],
+            'user': ['Status'] } } # intentional forward ref. to sub-module
 
 # for testing sub-modules
 { 'include': 'include/sub-module.json' }
index cecf270ec3529b59b793cfe4745c78f8d7cf71a5..38c1de70d80f3a3171ef5f4b7a8ef126a89dbcda 100644 (file)
@@ -144,6 +144,9 @@ object q_obj_sizeList-wrapper
     member data: sizeList optional=False
 object q_obj_anyList-wrapper
     member data: anyList optional=False
+array StatusList Status
+object q_obj_StatusList-wrapper
+    member data: StatusList optional=False
 enum UserDefListUnionKind
     member integer
     member s8
@@ -159,6 +162,7 @@ enum UserDefListUnionKind
     member string
     member sizes
     member any
+    member user
 object UserDefListUnion
     member type: UserDefListUnionKind optional=False
     tag type
@@ -176,6 +180,7 @@ object UserDefListUnion
     case string: q_obj_strList-wrapper
     case sizes: q_obj_sizeList-wrapper
     case any: q_obj_anyList-wrapper
+    case user: q_obj_StatusList-wrapper
 include include/sub-module.json
 module include/sub-module.json
 include sub-sub-module.json