On 08/14/2014 03:23 AM, Markus Armbruster wrote: > Eric Blake <ebl...@redhat.com> 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