David Reiss | d779cbe | 2007-08-31 01:42:55 +0000 | [diff] [blame] | 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 | */ |
| 10 | |
| 11 | /* |
| 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. |
| 15 | */ |
| 16 | |
David Reiss | 9a08dc6 | 2008-02-27 01:55:17 +0000 | [diff] [blame^] | 17 | namespace cpp thrift.test |
David Reiss | d779cbe | 2007-08-31 01:42:55 +0000 | [diff] [blame] | 18 | |
| 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, |
| 30 | } |
| 31 | |
| 32 | struct BonkZZ { |
| 33 | 1: i32 type, |
| 34 | 2: string message, |
| 35 | } |
| 36 | |
| 37 | struct NestingZZ { |
| 38 | 1: BonkZZ my_bonk, |
| 39 | 2: OneOfEachZZ my_ooe, |
| 40 | } |
| 41 | |
| 42 | struct HolyMoleyZZ { |
| 43 | 1: list<OneOfEachZZ> big, |
| 44 | 2: set<list<string>> contain, |
| 45 | 3: map<string,list<BonkZZ>> bonks, |
| 46 | } |
| 47 | |
| 48 | struct BackwardsZZ { |
| 49 | 2: i32 first_tag2, |
| 50 | 1: i32 second_tag1, |
| 51 | } |
| 52 | |
| 53 | struct EmptyZZ { |
| 54 | } |
| 55 | |
| 56 | struct WrapperZZ { |
| 57 | 1: EmptyZZ foo |
| 58 | } |
| 59 | |
| 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, |
| 69 | } |
| 70 | |
| 71 | service Srv { |
| 72 | i32 Janky(i32 arg) |
| 73 | } |
| 74 | |
| 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), |
| 80 | |
| 81 | OneOfEachZZ refl1(1: list<BonkZZ> arg1), |
| 82 | OneOfEachZZ refl2(2: list<string> arg1, 1: BonkZZ arg2); |
| 83 | } |