diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-03-23 10:40:25 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-03-23 22:31:53 +0100 |
commit | d83b47646ec2bdf4f7be9c2078f1bcbbb0544b2e (patch) | |
tree | 03ea4debaeddf5cf4339facbbcd69e58f30e3a5a /tests/qapi-schema/alternate-clash.json | |
parent | 407efbf9e776ade8e8d09b778851834f91b225a1 (diff) |
qapi: Enforce union and alternate branch naming rules
Union branch names should use '-', not '_'. Enforce this. The only
offenders are in tests/. Fix them.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-29-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Commit message typo fixed]
Diffstat (limited to 'tests/qapi-schema/alternate-clash.json')
-rw-r--r-- | tests/qapi-schema/alternate-clash.json | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/qapi-schema/alternate-clash.json b/tests/qapi-schema/alternate-clash.json index 039c4be658..87f061a74a 100644 --- a/tests/qapi-schema/alternate-clash.json +++ b/tests/qapi-schema/alternate-clash.json @@ -1,5 +1,7 @@ # Alternate branch name collision -# Reject an alternate that would result in a collision in generated C -# names (this would try to generate two union members named 'a_b'). +# Naming rules make collision impossible (even with the pragma). If +# that wasn't the case, then we'd get a collision in generated C: two +# union members a_b. +{ 'pragma': { 'member-name-exceptions': [ 'Alt1' ] } } { 'alternate': 'Alt1', 'data': { 'a-b': 'bool', 'a_b': 'int' } } |