blob: bd13d445a89493db0d576bd379297d8cc04e2da8 [file] [log] [blame]
David Reiss00dcccf2007-07-21 01:18:10 +00001cpp_namespace thrift.test
2
David Reissdb0ea152008-02-18 01:49:37 +00003struct 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 Reiss00dcccf2007-07-21 01:18:10 +000014struct 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 Reissdb0ea152008-02-18 01:49:37 +000025 11: binary base64,
David Reiss00dcccf2007-07-21 01:18:10 +000026}
27
28struct Bonk {
29 1: i32 type,
30 2: string message,
31}
32
33struct Nesting {
34 1: Bonk my_bonk,
35 2: OneOfEach my_ooe,
36}
37
38struct HolyMoley {
39 1: list<OneOfEach> big,
40 2: set<list<string>> contain,
41 3: map<string,list<Bonk>> bonks,
42}
David Reiss382fc302007-08-25 18:01:30 +000043
44struct Backwards {
45 2: i32 first_tag2,
46 1: i32 second_tag1,
47}
48
49struct Empty {
50}
51
52struct Wrapper {
53 1: Empty foo
54}
55
56struct 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
67service Srv {
68 i32 Janky(i32 arg)
69}
David Reiss23753122007-08-27 19:57:34 +000070
71service 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 Reissfaebedd2007-09-17 23:20:38 +000080
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.
83struct 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}