blob: 787c50107da7f8024cd4dd5fcf2928885a5a5b33 [file] [log] [blame]
David Reissd779cbe2007-08-31 01:42:55 +00001/*
2../compiler/cpp/thrift -cpp -dense DebugProtoTest.thrift
3../compiler/cpp/thrift -cpp -dense DenseLinkingTest.thrift
4g++ -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*/
10
11/*
12The idea of this test is that everything is structurally identical to DebugProtoTest.
13If I messed up the naming of the reflection local typespecs,
14then compiling this should give errors because of doubly defined symbols.
15*/
16
David Reiss9a08dc62008-02-27 01:55:17 +000017namespace cpp thrift.test
David Reissd779cbe2007-08-31 01:42:55 +000018
19struct 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,
30}
31
32struct BonkZZ {
33 1: i32 type,
34 2: string message,
35}
36
37struct NestingZZ {
38 1: BonkZZ my_bonk,
39 2: OneOfEachZZ my_ooe,
40}
41
42struct HolyMoleyZZ {
43 1: list<OneOfEachZZ> big,
44 2: set<list<string>> contain,
45 3: map<string,list<BonkZZ>> bonks,
46}
47
48struct BackwardsZZ {
49 2: i32 first_tag2,
50 1: i32 second_tag1,
51}
52
53struct EmptyZZ {
54}
55
56struct WrapperZZ {
57 1: EmptyZZ foo
58}
59
60struct 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,
69}
70
71service Srv {
72 i32 Janky(i32 arg)
73}
74
75service 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),
80
81 OneOfEachZZ refl1(1: list<BonkZZ> arg1),
82 OneOfEachZZ refl2(2: list<string> arg1, 1: BonkZZ arg2);
83}