diff options
Diffstat (limited to 'tests/qapi-schema')
-rw-r--r-- | tests/qapi-schema/reserved-enum-q.err | 1 | ||||
-rw-r--r-- | tests/qapi-schema/reserved-enum-q.exit | 1 | ||||
-rw-r--r-- | tests/qapi-schema/reserved-enum-q.json | 4 | ||||
-rw-r--r-- | tests/qapi-schema/reserved-enum-q.out | 0 | ||||
-rw-r--r-- | tests/qapi-schema/reserved-member-underscore.err | 1 | ||||
-rw-r--r-- | tests/qapi-schema/reserved-member-underscore.exit | 1 | ||||
-rw-r--r-- | tests/qapi-schema/reserved-member-underscore.json | 4 | ||||
-rw-r--r-- | tests/qapi-schema/reserved-member-underscore.out | 0 |
8 files changed, 12 insertions, 0 deletions
diff --git a/tests/qapi-schema/reserved-enum-q.err b/tests/qapi-schema/reserved-enum-q.err new file mode 100644 index 0000000..e1c3480 --- /dev/null +++ b/tests/qapi-schema/reserved-enum-q.err @@ -0,0 +1 @@ +tests/qapi-schema/reserved-enum-q.json:4: Member of enum 'Foo' uses invalid name 'q-Unix' diff --git a/tests/qapi-schema/reserved-enum-q.exit b/tests/qapi-schema/reserved-enum-q.exit new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/qapi-schema/reserved-enum-q.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/reserved-enum-q.json b/tests/qapi-schema/reserved-enum-q.json new file mode 100644 index 0000000..3593a76 --- /dev/null +++ b/tests/qapi-schema/reserved-enum-q.json @@ -0,0 +1,4 @@ +# C entity name collision +# We reject names like 'q-unix', because they can collide with the mangled +# name for 'unix' in generated C. +{ 'enum': 'Foo', 'data': [ 'unix', 'q-Unix' ] } diff --git a/tests/qapi-schema/reserved-enum-q.out b/tests/qapi-schema/reserved-enum-q.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/qapi-schema/reserved-enum-q.out diff --git a/tests/qapi-schema/reserved-member-underscore.err b/tests/qapi-schema/reserved-member-underscore.err new file mode 100644 index 0000000..65ff0da --- /dev/null +++ b/tests/qapi-schema/reserved-member-underscore.err @@ -0,0 +1 @@ +tests/qapi-schema/reserved-member-underscore.json:4: Member of 'data' for struct 'Oops' uses invalid name '_oops' diff --git a/tests/qapi-schema/reserved-member-underscore.exit b/tests/qapi-schema/reserved-member-underscore.exit new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/qapi-schema/reserved-member-underscore.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/reserved-member-underscore.json b/tests/qapi-schema/reserved-member-underscore.json new file mode 100644 index 0000000..4a3a017 --- /dev/null +++ b/tests/qapi-schema/reserved-member-underscore.json @@ -0,0 +1,4 @@ +# C member name collision +# We reject use of a single leading underscore in all names (names must +# begin with a letter or a downstream extension double-underscore prefix). +{ 'struct': 'Oops', 'data': { '_oops': 'str' } } diff --git a/tests/qapi-schema/reserved-member-underscore.out b/tests/qapi-schema/reserved-member-underscore.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/qapi-schema/reserved-member-underscore.out |