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