r1389@opsdev009 (orig r72873): mcslee | 2007-12-05 15:13:11 -0800
[amiethrift.git] / test / DebugProtoTest.thrift
blobe669fb3d03a4e444435cca7f299882792d68af31
1 /*
2 thrift -cpp DebugProtoTest.thrift
3 g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
4   DebugProtoTest.cpp gen-cpp/DebugProtoTest_types.cpp \
5   ../lib/cpp/.libs/libthrift.a -o DebugProtoTest
6 ./DebugProtoTest
7 */
9 cpp_namespace thrift.test
11 struct OneOfEach {
12   1: bool im_true,
13   2: bool im_false,
14   3: byte a_bite,
15   4: i16 integer16,
16   5: i32 integer32,
17   6: i64 integer64,
18   7: double double_precision,
19   8: string some_characters,
20   9: string zomg_unicode,
21   10: bool what_who,
24 struct Bonk {
25   1: i32 type,
26   2: string message,
29 struct Nesting {
30   1: Bonk my_bonk,
31   2: OneOfEach my_ooe,
34 struct HolyMoley {
35   1: list<OneOfEach> big,
36   2: set<list<string>> contain,
37   3: map<string,list<Bonk>> bonks,
40 struct Backwards {
41   2: i32 first_tag2,
42   1: i32 second_tag1,
45 struct Empty {
48 struct Wrapper {
49   1: Empty foo
52 struct RandomStuff {
53   1: i32 a,
54   2: i32 b,
55   3: i32 c,
56   4: i32 d,
57   5: list<i32> myintlist,
58   6: map<i32,Wrapper> maps,
59   7: i64 bigint,
60   8: double triple,
63 service Srv {
64   i32 Janky(i32 arg)
67 service PartiallyReflectable {
68   map<i32,map<i32,i32>> returnNotReflectable(1: i32 hello),
69   void argNotReflectable(1: list<set<i32>> arg),
70   void arg2NotReflectable(1: i32 arg1, 2: list<set<i32>> argNotReflectable),
71   void withMap(1: map<i32, string> amap),
73   OneOfEach refl1(1: list<Bonk> arg1),
74   OneOfEach refl2(2: list<string> arg1, 1: Bonk arg2);
77 // The only purpose of this thing is to increase the size of the generated code
78 // so that ZlibTest has more highly compressible data to play with.
79 struct BlowUp {
80   1: map<list<i32>,set<map<i32,string>>> b1;
81   2: map<list<i32>,set<map<i32,string>>> b2;
82   3: map<list<i32>,set<map<i32,string>>> b3;
83   4: map<list<i32>,set<map<i32,string>>> b4;