[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 29/50] qapi: add tests for invalid alternate
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v3 29/50] qapi: add tests for invalid alternate |
Date: |
Mon, 11 Sep 2017 13:06:02 +0200 |
Signed-off-by: Marc-André Lureau <address@hidden>
---
tests/Makefile.include | 1 +
tests/qapi-schema/alternate-dict-invalid.err | 1 +
tests/qapi-schema/alternate-dict-invalid.exit | 1 +
tests/qapi-schema/alternate-dict-invalid.json | 4 ++++
tests/qapi-schema/alternate-dict-invalid.out | 0
5 files changed, 7 insertions(+)
create mode 100644 tests/qapi-schema/alternate-dict-invalid.err
create mode 100644 tests/qapi-schema/alternate-dict-invalid.exit
create mode 100644 tests/qapi-schema/alternate-dict-invalid.json
create mode 100644 tests/qapi-schema/alternate-dict-invalid.out
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 44a3d8895e..4af0b0c2eb 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -380,6 +380,7 @@ qapi-schema += alternate-conflict-enum-int.json
qapi-schema += alternate-conflict-string.json
qapi-schema += alternate-conflict-bool-string.json
qapi-schema += alternate-conflict-num-string.json
+qapi-schema += alternate-dict-invalid.json
qapi-schema += alternate-empty.json
qapi-schema += alternate-nested.json
qapi-schema += alternate-unknown.json
diff --git a/tests/qapi-schema/alternate-dict-invalid.err
b/tests/qapi-schema/alternate-dict-invalid.err
new file mode 100644
index 0000000000..707c40f0f6
--- /dev/null
+++ b/tests/qapi-schema/alternate-dict-invalid.err
@@ -0,0 +1 @@
+tests/qapi-schema/alternate-dict-invalid.json:2: Member 'two' of alternate
'Alt' should be a type name
diff --git a/tests/qapi-schema/alternate-dict-invalid.exit
b/tests/qapi-schema/alternate-dict-invalid.exit
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/tests/qapi-schema/alternate-dict-invalid.exit
@@ -0,0 +1 @@
+1
diff --git a/tests/qapi-schema/alternate-dict-invalid.json
b/tests/qapi-schema/alternate-dict-invalid.json
new file mode 100644
index 0000000000..45f2c8ebef
--- /dev/null
+++ b/tests/qapi-schema/alternate-dict-invalid.json
@@ -0,0 +1,4 @@
+# invalid field dictionnary, missing type
+{ 'alternate': 'Alt',
+ 'data': { 'one': 'str',
+ 'two': { 'if': 'foo' } } }
diff --git a/tests/qapi-schema/alternate-dict-invalid.out
b/tests/qapi-schema/alternate-dict-invalid.out
new file mode 100644
index 0000000000..e69de29bb2
--
2.14.1.146.gd35faa819
- [Qemu-devel] [PATCH v3 21/50] qapi: add #if conditions on generated enum members, (continued)
- [Qemu-devel] [PATCH v3 21/50] qapi: add #if conditions on generated enum members, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 20/50] qapi-event: add 'if' condition to generated enum, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 23/50] qapi: add 'if' to struct members and implicit objects members, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 22/50] tests: add some enum members tests, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 24/50] qapi: add some struct member tests, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 25/50] qapi: add #if conditions to generated struct members, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 27/50] qapi: add #if conditions to generated variants, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 26/50] qapi: add 'if' on union variants, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 28/50] qapi: add 'if' to alternate variant, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 30/50] qapi: add #if conditions to generated alternate variants, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 29/50] qapi: add tests for invalid alternate,
Marc-André Lureau <=
- [Qemu-devel] [PATCH v3 32/50] qapi2texi: add 'If:' section to generated documentation, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 31/50] docs: document schema configuration, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 33/50] qapi2texi: add 'If:' condition to enum values, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 34/50] qapi2texi: add 'If:' condition to struct members, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 35/50] qapi2texi: add condition to variants, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 36/50] qapi: add conditions to VNC type/commands/events on the schema, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 37/50] qapi: add conditions to SPICE type/commands/events on the schema, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 38/50] qapi: add conditions to REPLICATION type/commands on the schema, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 39/50] qapi-commands: don't initialize command list in qmp_init_marshall(), Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 41/50] qapi: add a 'unit' pragma, Marc-André Lureau, 2017/09/11