Subversion Repositories SmartDukaan

Rev

Rev 30 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
30 ashish 1
/*
2
 * 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
/*
21
../compiler/cpp/thrift -gen cpp:dense DebugProtoTest.thrift
22
../compiler/cpp/thrift -gen cpp:dense DenseLinkingTest.thrift
23
g++ -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
/*
31
The idea of this test is that everything is structurally identical to DebugProtoTest.
32
If I messed up the naming of the reflection local typespecs,
33
then compiling this should give errors because of doubly defined symbols.
34
*/
35
 
36
namespace cpp thrift.test
37
 
38
struct 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
 
51
struct BonkZZ {
52
  1: i32 type,
53
  2: string message,
54
}
55
 
56
struct NestingZZ {
57
  1: BonkZZ my_bonk,
58
  2: OneOfEachZZ my_ooe,
59
}
60
 
61
struct HolyMoleyZZ {
62
  1: list<OneOfEachZZ> big,
63
  2: set<list<string>> contain,
64
  3: map<string,list<BonkZZ>> bonks,
65
}
66
 
67
struct BackwardsZZ {
68
  2: i32 first_tag2,
69
  1: i32 second_tag1,
70
}
71
 
72
struct EmptyZZ {
73
}
74
 
75
struct WrapperZZ {
76
  1: EmptyZZ foo
77
}
78
 
79
struct 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
 
90
service Srv {
91
  i32 Janky(1: i32 arg)
92
}