2015-05-04 15:05:08 +00:00
|
|
|
# we require the discriminator to be a string naming a base-type member
|
2015-05-04 15:05:13 +00:00
|
|
|
# this tests the old syntax for anonymous unions before we added alternates
|
2015-05-04 15:05:05 +00:00
|
|
|
{ 'enum': 'TestEnum',
|
|
|
|
'data': [ 'value1', 'value2' ] }
|
2015-05-04 15:05:27 +00:00
|
|
|
{ 'struct': 'TestBase',
|
2015-05-04 15:05:05 +00:00
|
|
|
'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
|
2015-05-04 15:05:27 +00:00
|
|
|
{ 'struct': 'TestTypeA',
|
2015-05-04 15:05:05 +00:00
|
|
|
'data': { 'string': 'str' } }
|
2015-05-04 15:05:27 +00:00
|
|
|
{ 'struct': 'TestTypeB',
|
2015-05-04 15:05:05 +00:00
|
|
|
'data': { 'integer': 'int' } }
|
|
|
|
{ 'union': 'TestUnion',
|
|
|
|
'base': 'TestBase',
|
2015-05-04 15:05:13 +00:00
|
|
|
'discriminator': {},
|
2015-05-04 15:05:05 +00:00
|
|
|
'data': { 'kind1': 'TestTypeA',
|
|
|
|
'kind2': 'TestTypeB' } }
|