aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-10-24 13:02:27 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-10-29 07:35:16 +0100
commit36a43905ffcac8767947626a6761df63fc020841 (patch)
tree9ff4be99477399d14decad1771588dc67201cde3 /tests
parentee1e6a1f6c830fd7530243a24c800063bc27a758 (diff)
downloadqemu-36a43905ffcac8767947626a6761df63fc020841.zip
qemu-36a43905ffcac8767947626a6761df63fc020841.tar.gz
qemu-36a43905ffcac8767947626a6761df63fc020841.tar.bz2
qapi: Fix enum doc comment checking
Enumeration type documentation comments are not checked, as demonstrated by test doc-bad-enum-member. This is because we neglect to call self.doc.check() for enumeration types. Messed up in 816a57cd6e "qapi: Fix detection of bogus member documentation". Fix it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191024110237.30963-10-armbru@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qapi-schema/doc-bad-enum-member.err1
-rw-r--r--tests/qapi-schema/doc-bad-enum-member.json1
-rw-r--r--tests/qapi-schema/doc-bad-enum-member.out21
3 files changed, 1 insertions, 22 deletions
diff --git a/tests/qapi-schema/doc-bad-enum-member.err b/tests/qapi-schema/doc-bad-enum-member.err
index e69de29..dfa1e78 100644
--- a/tests/qapi-schema/doc-bad-enum-member.err
+++ b/tests/qapi-schema/doc-bad-enum-member.err
@@ -0,0 +1 @@
+doc-bad-enum-member.json:3: the following documented members are not in the declaration: a
diff --git a/tests/qapi-schema/doc-bad-enum-member.json b/tests/qapi-schema/doc-bad-enum-member.json
index 9f32fe6..9cab35c 100644
--- a/tests/qapi-schema/doc-bad-enum-member.json
+++ b/tests/qapi-schema/doc-bad-enum-member.json
@@ -1,5 +1,4 @@
# Members listed in the doc comment must exist in the actual schema
-# BUG: nonexistent @a is not rejected
##
# @Foo:
diff --git a/tests/qapi-schema/doc-bad-enum-member.out b/tests/qapi-schema/doc-bad-enum-member.out
index 6ca31c1..e69de29 100644
--- a/tests/qapi-schema/doc-bad-enum-member.out
+++ b/tests/qapi-schema/doc-bad-enum-member.out
@@ -1,21 +0,0 @@
-module None
-object q_empty
-enum QType
- prefix QTYPE
- member none
- member qnull
- member qnum
- member qstring
- member qdict
- member qlist
- member qbool
-module doc-bad-enum-member.json
-enum Foo
- member b
-doc symbol=Foo
- body=
-
- arg=a
-a
- arg=b
-b