Commit ad11dbb9 authored by Eric Blake's avatar Eric Blake Committed by Markus Armbruster
Browse files

qapi: Add some enum tests



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.

Signed-off-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
parent fe2a9303
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -207,7 +207,11 @@ $(foreach target,$(SYSEMU_TARGET_LIST), \
		$(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF))))

check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
	comments.json empty.json funny-char.json indented-expr.json \
	comments.json empty.json enum-empty.json enum-missing-data.json \
	enum-wrong-data.json enum-int-member.json enum-dict-member.json \
	enum-clash-member.json enum-max-member.json enum-union-clash.json \
	enum-bad-name.json \
	funny-char.json indented-expr.json \
	missing-colon.json missing-comma-list.json \
	missing-comma-object.json non-objects.json \
	qapi-schema-test.json quoted-structural-chars.json \
+0 −0

Empty file added.

+1 −0
Original line number Diff line number Diff line
0
+2 −0
Original line number Diff line number Diff line
# FIXME: we should ensure all enum names can map to C
{ 'enum': 'MyEnum', 'data': [ 'not^possible' ] }
+3 −0
Original line number Diff line number Diff line
[OrderedDict([('enum', 'MyEnum'), ('data', ['not^possible'])])]
[{'enum_name': 'MyEnum', 'enum_values': ['not^possible']}]
[]
Loading