Eric Blake | 3d0c482 | 2015-05-04 09:05:05 -0600 | [diff] [blame] | 1 | # a union base type must be a struct |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 2 | { 'struct': 'TestTypeA', |
Wenchao Xia | b86b05e | 2014-03-04 18:44:34 -0800 | [diff] [blame] | 3 | 'data': { 'string': 'str' } } |
| 4 | |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 5 | { 'struct': 'TestTypeB', |
Wenchao Xia | b86b05e | 2014-03-04 18:44:34 -0800 | [diff] [blame] | 6 | 'data': { 'integer': 'int' } } |
| 7 | |
| 8 | { 'union': 'TestUnion', |
Eric Blake | 3d0c482 | 2015-05-04 09:05:05 -0600 | [diff] [blame] | 9 | 'base': 'int', |
| 10 | 'discriminator': 'int', |
Wenchao Xia | b86b05e | 2014-03-04 18:44:34 -0800 | [diff] [blame] | 11 | 'data': { 'value1': 'TestTypeA', |
| 12 | 'value2': 'TestTypeB' } } |