blob: cf61496aa33964d23fb9fed1d8d6b7e5a55aa18e [file] [log] [blame]
David Reissd779cbe2007-08-31 01:42:55 +00001/*
David Reissea2cba82009-03-30 21:35:00 +00002 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20/*
David Reissb139f642009-02-17 20:28:46 +000021../compiler/cpp/thrift -gen cpp:dense DebugProtoTest.thrift
22../compiler/cpp/thrift -gen cpp:dense DenseLinkingTest.thrift
David Reissd779cbe2007-08-31 01:42:55 +000023g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
24 DebugProtoTest.cpp gen-cpp/DebugProtoTest_types.cpp \
25 gen-cpp/DenseLinkingTest_types.cpp \
26 ../lib/cpp/.libs/libthrift.a -o DebugProtoTest
27./DebugProtoTest
28*/
29
30/*
31The idea of this test is that everything is structurally identical to DebugProtoTest.
32If I messed up the naming of the reflection local typespecs,
33then compiling this should give errors because of doubly defined symbols.
34*/
35
David Reiss9a08dc62008-02-27 01:55:17 +000036namespace cpp thrift.test
David Reissd779cbe2007-08-31 01:42:55 +000037
38struct OneOfEachZZ {
39 1: bool im_true,
40 2: bool im_false,
41 3: byte a_bite,
42 4: i16 integer16,
43 5: i32 integer32,
44 6: i64 integer64,
45 7: double double_precision,
46 8: string some_characters,
47 9: string zomg_unicode,
48 10: bool what_who,
49}
50
51struct BonkZZ {
52 1: i32 type,
53 2: string message,
54}
55
56struct NestingZZ {
57 1: BonkZZ my_bonk,
58 2: OneOfEachZZ my_ooe,
59}
60
61struct HolyMoleyZZ {
62 1: list<OneOfEachZZ> big,
63 2: set<list<string>> contain,
64 3: map<string,list<BonkZZ>> bonks,
65}
66
67struct BackwardsZZ {
68 2: i32 first_tag2,
69 1: i32 second_tag1,
70}
71
72struct EmptyZZ {
73}
74
75struct WrapperZZ {
76 1: EmptyZZ foo
77}
78
79struct RandomStuffZZ {
80 1: i32 a,
81 2: i32 b,
82 3: i32 c,
83 4: i32 d,
84 5: list<i32> myintlist,
85 6: map<i32,WrapperZZ> maps,
86 7: i64 bigint,
87 8: double triple,
88}
89
90service Srv {
David Reiss689c9ad2009-04-02 19:24:02 +000091 i32 Janky(1: i32 arg)
David Reissd779cbe2007-08-31 01:42:55 +000092}