Marc-André Lureau <marcandre.lur...@gmail.com> writes: > Hi > > On Sat, Dec 9, 2017 at 10:07 AM, Markus Armbruster <arm...@redhat.com> wrote: >> Marc-André Lureau <marcandre.lur...@redhat.com> writes: [...] >>> diff --git a/tests/qapi-schema/struct-member-type.json >>> b/tests/qapi-schema/struct-member-type.json >>> new file mode 100644 >>> index 0000000000..8b33027817 >>> --- /dev/null >>> +++ b/tests/qapi-schema/struct-member-type.json >>> @@ -0,0 +1,2 @@ >>> +# check member 'a' with 'type' key only >>> +{ 'struct': 'foo', 'data': { 'a': { 'type': 'str' } } } >>> diff --git a/tests/qapi-schema/struct-member-type.out >>> b/tests/qapi-schema/struct-member-type.out >>> new file mode 100644 >>> index 0000000000..04b969d2e3 >>> --- /dev/null >>> +++ b/tests/qapi-schema/struct-member-type.out >>> @@ -0,0 +1,12 @@ >>> +enum QType >>> + prefix QTYPE >>> + member none: >>> + member qnull: >>> + member qnum: >>> + member qstring: >>> + member qdict: >>> + member qlist: >>> + member qbool: >>> +object foo >>> + member a: str optional=False >>> +object q_empty >> >> This is a positive test, isn't it? Positive tests go into >> qapi-schema-test.json. >> > > Right, I wonder why we have .exit files then. Perhaps the few ones > that return 0 shouldn't exist.
There are a few legitimate positive test cases, such as empty.json and doc-good.json. Moreover, we occasionally add negative test cases that fail to fail, demonstrating a bug. Example: quoted-structural-chars in commit 98626572f1, fixed in commit c7a3f25200.