summaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/flat-union-inline.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/flat-union-inline.json')
-rw-r--r--tests/qapi-schema/flat-union-inline.json11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/qapi-schema/flat-union-inline.json b/tests/qapi-schema/flat-union-inline.json
new file mode 100644
index 0000000..2bdffeb
--- /dev/null
+++ b/tests/qapi-schema/flat-union-inline.json
@@ -0,0 +1,11 @@
+# FIXME: poor message: we require branches to be a complex type name
+# TODO: should we allow anonymous inline types?
+{ 'enum': 'TestEnum',
+ 'data': [ 'value1', 'value2' ] }
+{ 'type': 'Base',
+ 'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
+{ 'union': 'TestUnion',
+ 'base': { 'enum1': 'TestEnum', 'kind': 'str' },
+ 'discriminator': 'enum1',
+ 'data': { 'value1': { 'string': 'str' },
+ 'value2': { 'integer': 'int' } } }
OpenPOWER on IntegriCloud