blob: 3fb1d68b85f0be9909bc3778b3df330280dd4725 [file] [log] [blame]
Bryan Duxbury1e79cb42011-12-21 18:13:29 +00001/*
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// The java codegenerator has a few different codepaths depending
21// on how many optionals the struct has; this attempts to exercise
22// them.
23
24namespace java thrift.test
25
26struct Opt4 {
27 1: i32 def1;
28 2: i32 def2;
29 3: i32 def3;
30 4: i32 def4;
31}
32
33struct Opt13 {
34 1: i32 def1;
35 2: i32 def2;
36 3: i32 def3;
37 4: i32 def4;
38 5: i32 def5;
39 6: i32 def6;
40 7: i32 def7;
41 8: i32 def8;
42 9: i32 def9;
43 10: i32 def10;
44 11: i32 def11;
45 12: i32 def12;
46 13: i32 def13;
47}
48
49struct Opt30 {
50 1: i32 def1;
51 2: i32 def2;
52 3: i32 def3;
53 4: i32 def4;
54 5: i32 def5;
55 6: i32 def6;
56 7: i32 def7;
57 8: i32 def8;
58 9: i32 def9;
59 10: i32 def10;
60 11: i32 def11;
61 12: i32 def12;
62 13: i32 def13;
63 14: i32 def14;
64 15: i32 def15;
65 16: i32 def16;
66 17: i32 def17;
67 18: i32 def18;
68 19: i32 def19;
69 20: i32 def20;
70 21: i32 def21;
71 22: i32 def22;
72 23: i32 def23;
73 24: i32 def24;
74 25: i32 def25;
75 26: i32 def26;
76 27: i32 def27;
77 28: i32 def28;
78 29: i32 def29;
79 30: i32 def30;
80}
81
82struct Opt64 {
83 1: i32 def1;
84 2: i32 def2;
85 3: i32 def3;
86 4: i32 def4;
87 5: i32 def5;
88 6: i32 def6;
89 7: i32 def7;
90 8: i32 def8;
91 9: i32 def9;
92 10: i32 def10;
93 11: i32 def11;
94 12: i32 def12;
95 13: i32 def13;
96 14: i32 def14;
97 15: i32 def15;
98 16: i32 def16;
99 17: i32 def17;
100 18: i32 def18;
101 19: i32 def19;
102 20: i32 def20;
103 21: i32 def21;
104 22: i32 def22;
105 23: i32 def23;
106 24: i32 def24;
107 25: i32 def25;
108 26: i32 def26;
109 27: i32 def27;
110 28: i32 def28;
111 29: i32 def29;
112 30: i32 def30;
113 31: i32 def31;
114 32: i32 def32;
115 33: i32 def33;
116 34: i32 def34;
117 35: i32 def35;
118 36: i32 def36;
119 37: i32 def37;
120 38: i32 def38;
121 39: i32 def39;
122 40: i32 def40;
123 41: i32 def41;
124 42: i32 def42;
125 43: i32 def43;
126 44: i32 def44;
127 45: i32 def45;
128 46: i32 def46;
129 47: i32 def47;
130 48: i32 def48;
131 49: i32 def49;
132 50: i32 def50;
133 51: i32 def51;
134 52: i32 def52;
135 53: i32 def53;
136 54: i32 def54;
137 55: i32 def55;
138 56: i32 def56;
139 57: i32 def57;
140 58: i32 def58;
141 59: i32 def59;
142 60: i32 def60;
143 61: i32 def61;
144 62: i32 def62;
145 63: i32 def63;
146 64: i32 def64;
147}
148
149struct Opt80 {
150 1: i32 def1;
151 2: i32 def2;
152 3: i32 def3;
153 4: i32 def4;
154 5: i32 def5;
155 6: i32 def6;
156 7: i32 def7;
157 8: i32 def8;
158 9: i32 def9;
159 10: i32 def10;
160 11: i32 def11;
161 12: i32 def12;
162 13: i32 def13;
163 14: i32 def14;
164 15: i32 def15;
165 16: i32 def16;
166 17: i32 def17;
167 18: i32 def18;
168 19: i32 def19;
169 20: i32 def20;
170 21: i32 def21;
171 22: i32 def22;
172 23: i32 def23;
173 24: i32 def24;
174 25: i32 def25;
175 26: i32 def26;
176 27: i32 def27;
177 28: i32 def28;
178 29: i32 def29;
179 30: i32 def30;
180 31: i32 def31;
181 32: i32 def32;
182 33: i32 def33;
183 34: i32 def34;
184 35: i32 def35;
185 36: i32 def36;
186 37: i32 def37;
187 38: i32 def38;
188 39: i32 def39;
189 40: i32 def40;
190 41: i32 def41;
191 42: i32 def42;
192 43: i32 def43;
193 44: i32 def44;
194 45: i32 def45;
195 46: i32 def46;
196 47: i32 def47;
197 48: i32 def48;
198 49: i32 def49;
199 50: i32 def50;
200 51: i32 def51;
201 52: i32 def52;
202 53: i32 def53;
203 54: i32 def54;
204 55: i32 def55;
205 56: i32 def56;
206 57: i32 def57;
207 58: i32 def58;
208 59: i32 def59;
209 60: i32 def60;
210 61: i32 def61;
211 62: i32 def62;
212 63: i32 def63;
213 64: i32 def64;
214 65: i32 def65;
215 66: i32 def66;
216 67: i32 def67;
217 68: i32 def68;
218 69: i32 def69;
219 70: i32 def70;
220 71: i32 def71;
221 72: i32 def72;
222 73: i32 def73;
223 74: i32 def74;
224 75: i32 def75;
225 76: i32 def76;
226 77: i32 def77;
227 78: i32 def78;
228 79: i32 def79;
229 80: i32 def80;
230}
231