mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
tests/qapi-schema: Error case tests for features in structs
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20190606153803.5278-4-armbru@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
committed by
Markus Armbruster
parent
8aa3a33e44
commit
a00af40425
@@ -378,6 +378,12 @@ qapi-schema += event-boxed-empty.json
|
||||
qapi-schema += event-case.json
|
||||
qapi-schema += event-member-invalid-dict.json
|
||||
qapi-schema += event-nest-struct.json
|
||||
qapi-schema += features-bad-type.json
|
||||
qapi-schema += features-duplicate-name.json
|
||||
qapi-schema += features-missing-name.json
|
||||
qapi-schema += features-name-bad-type.json
|
||||
qapi-schema += features-no-list.json
|
||||
qapi-schema += features-unknown-key.json
|
||||
qapi-schema += flat-union-array-branch.json
|
||||
qapi-schema += flat-union-bad-base.json
|
||||
qapi-schema += flat-union-bad-discriminator.json
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
tests/qapi-schema/features-bad-type.json:1: Feature of struct FeatureStruct0 requires a string name
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,3 @@
|
||||
{ 'struct': 'FeatureStruct0',
|
||||
'data': { 'foo': 'int' },
|
||||
'features': [ [ 'a feature cannot be an array' ] ] }
|
||||
@@ -0,0 +1 @@
|
||||
tests/qapi-schema/features-duplicate-name.json:1: 'foo' (feature of FeatureStruct0) collides with 'foo' (feature of FeatureStruct0)
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,3 @@
|
||||
{ 'struct': 'FeatureStruct0',
|
||||
'data': { 'foo': 'int' },
|
||||
'features': [ 'foo', 'bar', 'foo' ] }
|
||||
@@ -0,0 +1 @@
|
||||
tests/qapi-schema/features-missing-name.json:1: Key 'name' is missing from feature of struct FeatureStruct0
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,3 @@
|
||||
{ 'struct': 'FeatureStruct0',
|
||||
'data': { 'foo': 'int' },
|
||||
'features': [ { 'if': 'defined(NAMELESS_FEATURES)' } ] }
|
||||
@@ -0,0 +1 @@
|
||||
tests/qapi-schema/features-name-bad-type.json:1: Feature of struct FeatureStruct0 requires a string name
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,3 @@
|
||||
{ 'struct': 'FeatureStruct0',
|
||||
'data': { 'foo': 'int' },
|
||||
'features': [ { 'name': { 'feature-type': 'object' } } ] }
|
||||
@@ -0,0 +1 @@
|
||||
tests/qapi-schema/features-no-list.json:1: Struct 'FeatureStruct0' requires an array for 'features'
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,3 @@
|
||||
{ 'struct': 'FeatureStruct0',
|
||||
'data': { 'foo': 'int' },
|
||||
'features': 'bar' }
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user