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