qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]