blob: ef92f9b583c62da5b6a8e334c489b55de11a7f74 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# we require the discriminator to be a string naming a base-type member
# this tests the old syntax for anonymous unions before we added alternates
##
# @TestEnum:
##
{ 'enum': 'TestEnum',
'data': [ 'value1', 'value2' ] }
##
# @TestBase:
##
{ 'struct': 'TestBase',
'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
##
# @TestTypeA:
##
{ 'struct': 'TestTypeA',
'data': { 'string': 'str' } }
##
# @TestTypeB:
##
{ 'struct': 'TestTypeB',
'data': { 'integer': 'int' } }
##
# @TestUnion:
##
{ 'union': 'TestUnion',
'base': 'TestBase',
'discriminator': {},
'data': { 'kind1': 'TestTypeA',
'kind2': 'TestTypeB' } }
|