aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/qapi-schema/reserved-type-list.err1
-rw-r--r--tests/qapi-schema/reserved-type-list.exit2
-rw-r--r--tests/qapi-schema/reserved-type-list.json6
-rw-r--r--tests/qapi-schema/reserved-type-list.out3
4 files changed, 5 insertions, 7 deletions
diff --git a/tests/qapi-schema/reserved-type-list.err b/tests/qapi-schema/reserved-type-list.err
index e69de29bb2..4510fa6d90 100644
--- a/tests/qapi-schema/reserved-type-list.err
+++ b/tests/qapi-schema/reserved-type-list.err
@@ -0,0 +1 @@
+tests/qapi-schema/reserved-type-list.json:5: struct 'FooList' should not end in 'List'
diff --git a/tests/qapi-schema/reserved-type-list.exit b/tests/qapi-schema/reserved-type-list.exit
index 573541ac97..d00491fd7e 100644
--- a/tests/qapi-schema/reserved-type-list.exit
+++ b/tests/qapi-schema/reserved-type-list.exit
@@ -1 +1 @@
-0
+1
diff --git a/tests/qapi-schema/reserved-type-list.json b/tests/qapi-schema/reserved-type-list.json
index 5b7d0f995f..98d53bf808 100644
--- a/tests/qapi-schema/reserved-type-list.json
+++ b/tests/qapi-schema/reserved-type-list.json
@@ -1,5 +1,5 @@
# Potential C name collision
-# FIXME - This parses and compiles on its own, but prevents the user from
-# creating a type named 'Foo' and using ['Foo'] for an array. We should
-# reject the use of any type names ending in 'List'.
+# We reserve names ending in 'List' for use by array types.
+# TODO - we could choose array names to avoid collision with user types,
+# in order to let this compile
{ 'struct': 'FooList', 'data': { 's': 'str' } }
diff --git a/tests/qapi-schema/reserved-type-list.out b/tests/qapi-schema/reserved-type-list.out
index 0406bfe319..e69de29bb2 100644
--- a/tests/qapi-schema/reserved-type-list.out
+++ b/tests/qapi-schema/reserved-type-list.out
@@ -1,3 +0,0 @@
-object :empty
-object FooList
- member s: str optional=False