r1407@opsdev009 (orig r74442): dreiss | 2007-12-14 15:46:47 -0800
[amiethrift.git] / test / DenseLinkingTest.thrift
blob9414bd54a8b0139da9be1a61f232e4428ead27f3
1 /*
2 ../compiler/cpp/thrift -cpp -dense DebugProtoTest.thrift
3 ../compiler/cpp/thrift -cpp -dense DenseLinkingTest.thrift
4 g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
5   DebugProtoTest.cpp gen-cpp/DebugProtoTest_types.cpp \
6   gen-cpp/DenseLinkingTest_types.cpp \
7   ../lib/cpp/.libs/libthrift.a -o DebugProtoTest
8 ./DebugProtoTest
9 */
12 The idea of this test is that everything is structurally identical to DebugProtoTest.
13 If I messed up the naming of the reflection local typespecs,
14 then compiling this should give errors because of doubly defined symbols.
17 cpp_namespace thrift.test
19 struct OneOfEachZZ {
20   1: bool im_true,
21   2: bool im_false,
22   3: byte a_bite,
23   4: i16 integer16,
24   5: i32 integer32,
25   6: i64 integer64,
26   7: double double_precision,
27   8: string some_characters,
28   9: string zomg_unicode,
29   10: bool what_who,
32 struct BonkZZ {
33   1: i32 type,
34   2: string message,
37 struct NestingZZ {
38   1: BonkZZ my_bonk,
39   2: OneOfEachZZ my_ooe,
42 struct HolyMoleyZZ {
43   1: list<OneOfEachZZ> big,
44   2: set<list<string>> contain,
45   3: map<string,list<BonkZZ>> bonks,
48 struct BackwardsZZ {
49   2: i32 first_tag2,
50   1: i32 second_tag1,
53 struct EmptyZZ {
56 struct WrapperZZ {
57   1: EmptyZZ foo
60 struct RandomStuffZZ {
61   1: i32 a,
62   2: i32 b,
63   3: i32 c,
64   4: i32 d,
65   5: list<i32> myintlist,
66   6: map<i32,WrapperZZ> maps,
67   7: i64 bigint,
68   8: double triple,
71 service Srv {
72   i32 Janky(i32 arg)
75 service PartiallyReflectable {
76   map<i32,map<i32,i32>> returnNotReflectable(1: i32 hello),
77   void argNotReflectable(1: list<set<i32>> arg),
78   void arg2NotReflectable(1: i32 arg1, 2: list<set<i32>> argNotReflectable),
79   void withMap(1: map<i32, string> amap),
81   OneOfEachZZ refl1(1: list<BonkZZ> arg1),
82   OneOfEachZZ refl2(2: list<string> arg1, 1: BonkZZ arg2);