blob: 3a5b957411fe1ef17a7813cfa9a55e8441ea6e0d [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
Roger Meiere86428c2014-05-30 00:14:50 +020037namespace java thrift.test
David Reissd779cbe2007-08-31 01:42:55 +000038
39struct OneOfEachZZ {
40 1: bool im_true,
41 2: bool im_false,
42 3: byte a_bite,
43 4: i16 integer16,
44 5: i32 integer32,
45 6: i64 integer64,
46 7: double double_precision,
47 8: string some_characters,
48 9: string zomg_unicode,
49 10: bool what_who,
50}
51
52struct BonkZZ {
53 1: i32 type,
54 2: string message,
55}
56
57struct NestingZZ {
58 1: BonkZZ my_bonk,
59 2: OneOfEachZZ my_ooe,
60}
61
62struct HolyMoleyZZ {
63 1: list<OneOfEachZZ> big,
64 2: set<list<string>> contain,
65 3: map<string,list<BonkZZ>> bonks,
66}
67
68struct BackwardsZZ {
69 2: i32 first_tag2,
70 1: i32 second_tag1,
71}
72
73struct EmptyZZ {
74}
75
76struct WrapperZZ {
77 1: EmptyZZ foo
78}
79
80struct RandomStuffZZ {
81 1: i32 a,
82 2: i32 b,
83 3: i32 c,
84 4: i32 d,
85 5: list<i32> myintlist,
86 6: map<i32,WrapperZZ> maps,
87 7: i64 bigint,
88 8: double triple,
89}
90
91service Srv {
David Reiss689c9ad2009-04-02 19:24:02 +000092 i32 Janky(1: i32 arg)
David Reissd779cbe2007-08-31 01:42:55 +000093}
Roger Meier84d11882014-07-25 23:26:11 +020094
95service UnderscoreSrv {
96 i64 some_rpc_call(1: string message)
97}
98