David Reiss | 00dcccf | 2007-07-21 01:18:10 +0000 | [diff] [blame] | 1 | cpp_namespace thrift.test |
| 2 | |
David Reiss | db0ea15 | 2008-02-18 01:49:37 +0000 | [diff] [blame^] | 3 | struct Doubles { |
| 4 | 1: double nan, |
| 5 | 2: double inf, |
| 6 | 3: double neginf, |
| 7 | 4: double repeating, |
| 8 | 5: double big, |
| 9 | 6: double small, |
| 10 | 7: double zero, |
| 11 | 8: double negzero, |
| 12 | } |
| 13 | |
David Reiss | 00dcccf | 2007-07-21 01:18:10 +0000 | [diff] [blame] | 14 | struct OneOfEach { |
| 15 | 1: bool im_true, |
| 16 | 2: bool im_false, |
| 17 | 3: byte a_bite, |
| 18 | 4: i16 integer16, |
| 19 | 5: i32 integer32, |
| 20 | 6: i64 integer64, |
| 21 | 7: double double_precision, |
| 22 | 8: string some_characters, |
| 23 | 9: string zomg_unicode, |
| 24 | 10: bool what_who, |
David Reiss | db0ea15 | 2008-02-18 01:49:37 +0000 | [diff] [blame^] | 25 | 11: binary base64, |
David Reiss | 00dcccf | 2007-07-21 01:18:10 +0000 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | struct Bonk { |
| 29 | 1: i32 type, |
| 30 | 2: string message, |
| 31 | } |
| 32 | |
| 33 | struct Nesting { |
| 34 | 1: Bonk my_bonk, |
| 35 | 2: OneOfEach my_ooe, |
| 36 | } |
| 37 | |
| 38 | struct HolyMoley { |
| 39 | 1: list<OneOfEach> big, |
| 40 | 2: set<list<string>> contain, |
| 41 | 3: map<string,list<Bonk>> bonks, |
| 42 | } |
David Reiss | 382fc30 | 2007-08-25 18:01:30 +0000 | [diff] [blame] | 43 | |
| 44 | struct Backwards { |
| 45 | 2: i32 first_tag2, |
| 46 | 1: i32 second_tag1, |
| 47 | } |
| 48 | |
| 49 | struct Empty { |
| 50 | } |
| 51 | |
| 52 | struct Wrapper { |
| 53 | 1: Empty foo |
| 54 | } |
| 55 | |
| 56 | struct RandomStuff { |
| 57 | 1: i32 a, |
| 58 | 2: i32 b, |
| 59 | 3: i32 c, |
| 60 | 4: i32 d, |
| 61 | 5: list<i32> myintlist, |
| 62 | 6: map<i32,Wrapper> maps, |
| 63 | 7: i64 bigint, |
| 64 | 8: double triple, |
| 65 | } |
| 66 | |
| 67 | service Srv { |
| 68 | i32 Janky(i32 arg) |
| 69 | } |
David Reiss | 2375312 | 2007-08-27 19:57:34 +0000 | [diff] [blame] | 70 | |
| 71 | service PartiallyReflectable { |
| 72 | map<i32,map<i32,i32>> returnNotReflectable(1: i32 hello), |
| 73 | void argNotReflectable(1: list<set<i32>> arg), |
| 74 | void arg2NotReflectable(1: i32 arg1, 2: list<set<i32>> argNotReflectable), |
| 75 | void withMap(1: map<i32, string> amap), |
| 76 | |
| 77 | OneOfEach refl1(1: list<Bonk> arg1), |
| 78 | OneOfEach refl2(2: list<string> arg1, 1: Bonk arg2); |
| 79 | } |
David Reiss | faebedd | 2007-09-17 23:20:38 +0000 | [diff] [blame] | 80 | |
| 81 | // The only purpose of this thing is to increase the size of the generated code |
| 82 | // so that ZlibTest has more highly compressible data to play with. |
| 83 | struct BlowUp { |
| 84 | 1: map<list<i32>,set<map<i32,string>>> b1; |
| 85 | 2: map<list<i32>,set<map<i32,string>>> b2; |
| 86 | 3: map<list<i32>,set<map<i32,string>>> b3; |
| 87 | 4: map<list<i32>,set<map<i32,string>>> b4; |
| 88 | } |