David Reiss | 9a08dc6 | 2008-02-27 01:55:17 +0000 | [diff] [blame] | 1 | namespace cpp thrift.test |
David Reiss | 3b15ebc | 2008-03-02 06:29:19 +0000 | [diff] [blame] | 2 | namespace java thrift.test |
David Reiss | 8320a92 | 2007-08-14 19:59:26 +0000 | [diff] [blame] | 3 | |
| 4 | struct OldSchool { |
| 5 | 1: i16 im_int; |
| 6 | 2: string im_str; |
| 7 | 3: list<map<i32,string>> im_big; |
| 8 | } |
| 9 | |
| 10 | struct Simple { |
| 11 | 1: /* :) */ i16 im_default; |
| 12 | 2: required i16 im_required; |
| 13 | 3: optional i16 im_optional; |
| 14 | } |
| 15 | |
| 16 | struct Tricky1 { |
| 17 | 1: /* :) */ i16 im_default; |
| 18 | } |
| 19 | |
| 20 | struct Tricky2 { |
| 21 | 1: optional i16 im_optional; |
| 22 | } |
| 23 | |
| 24 | struct Tricky3 { |
| 25 | 1: required i16 im_required; |
| 26 | } |
| 27 | |
| 28 | struct Complex { |
| 29 | 1: i16 cp_default; |
| 30 | 2: required i16 cp_required; |
| 31 | 3: optional i16 cp_optional; |
| 32 | 4: map<i16,Simple> the_map; |
| 33 | 5: required Simple req_simp; |
| 34 | 6: optional Simple opt_simp; |
| 35 | } |
David Reiss | ce161a9 | 2007-09-11 22:09:42 +0000 | [diff] [blame] | 36 | |
| 37 | struct ManyOpt { |
| 38 | 1: optional i32 opt1; |
| 39 | 2: optional i32 opt2; |
| 40 | 3: optional i32 opt3; |
| 41 | 4: i32 def4; |
| 42 | 5: optional i32 opt5; |
| 43 | 6: optional i32 opt6; |
| 44 | } |
David Reiss | 3b15ebc | 2008-03-02 06:29:19 +0000 | [diff] [blame] | 45 | |
| 46 | struct JavaTestHelper { |
| 47 | 1: required i32 req_int; |
| 48 | 2: optional i32 opt_int; |
| 49 | 3: required string req_obj; |
| 50 | 4: optional string opt_obj; |
| 51 | 5: required binary req_bin; |
| 52 | 6: optional binary opt_bin; |
| 53 | } |