Anthony F. Molinaro | e49a44a | 2011-06-18 06:04:01 +0000 | [diff] [blame] | 1 | -module(test_thrift_1151). |
| 2 | |
| 3 | -include("thrift1151_types.hrl"). |
| 4 | |
| 5 | -export([t/0, t1/0]). |
| 6 | |
| 7 | t() -> |
| 8 | S1 = #structC{x=#structB{x=1}}, |
| 9 | {ok, Transport} = thrift_memory_buffer:new(), |
| 10 | {ok, Protocol} = thrift_binary_protocol:new(Transport), |
| 11 | thrift_protocol:write(Protocol, |
| 12 | {{struct, element(2, thrift1151_types:struct_info('structC'))}, S1}). |
| 13 | |
| 14 | t1() -> |
| 15 | S2 = #structC{x=#structA{x="1"}}, |
| 16 | {ok, Transport} = thrift_memory_buffer:new(), |
| 17 | {ok, Protocol} = thrift_binary_protocol:new(Transport), |
| 18 | thrift_protocol:write(Protocol, |
| 19 | {{struct, element(2, thrift1151_types:struct_info('structC'))}, S2}). |