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