[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 03/14] qapi: add some enum tests
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 03/14] qapi: add some enum tests |
Date: |
Thu, 14 Aug 2014 06:21:39 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
On 08/14/2014 03:23 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> writes:
>
>> Demonstrate that the qapi generator doesn't deal well with enums
>> that aren't up to par. Later patches will update the expected
>> results as the generator is made stricter.
>>
>> * tests/qapi-schema/enum-empty.*: New files.
>> * tests/qapi-schema/enum-missing-data.*: Likewise.
>> * tests/qapi-schema/enum-wrong-data.*: Likewise.
>> * tests/Makefile (check-qapi-schema-y): Run them.
>>
>> +++ b/tests/qapi-schema/enum-wrong-data.out
>> @@ -0,0 +1,3 @@
>> +[OrderedDict([('enum', 'MyEnum'), ('data', OrderedDict([('value',
>> 'str')]))])]
>> +[{'enum_name': 'MyEnum', 'enum_values': OrderedDict([('value', 'str')])}]
>> +[]
>
> For tests demonstrating incorrect behavior, a comment describing the
> expected behavior is always welcome.
Okay, I'll add comments to the .json files that expose weaknesses, when
submitting v4
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 00/14] drop qapi nested structs, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v3 04/14] qapi: better error message for bad enum, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v3 03/14] qapi: add some enum tests, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v3 06/14] qapi: require valid expressions, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v3 08/14] qapi: add expr_name() helper, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v3 01/14] qapi: consistent whitespace in tests/Makefile, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v3 09/14] qapi: add check_type helper function, Eric Blake, 2014/08/05