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
10 * http://www.apache.org/licenses/LICENSE-2.0
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
20 //break34 - Field added to struct with Field ID being in between two existing field IDs
25 const i32 const1 = 123;
26 const double const2 = 23.3;
27 const map<string,string> const3 = {"hello":"world", "thrift":"audit"};
31 exception test_exception1 {
35 exception test_exception2 {
64 1: i16 struct1_member1,
65 2: i32 struct1_member2,
66 3: i64 struct1_member3,
67 4: double struct1_member4 = 2.5,
68 5: string struct1_member5 = "Audit test",
69 6: bool struct1_member6,
70 7: byte struct1_member7,
71 8: binary struct1_member8,
72 9: test_enum1 struct1_member9
76 1: list<i16> struct2_member1,
77 2: list<i32> struct2_member2,
78 3: list<i64> struct2_member3 = [23, 32 ],
79 4: list<double> struct2_member4,
80 5: list<string> struct2_member5,
81 6: list<bool> struct2_member6,
82 7: list<byte> struct2_member7,
83 8: list<binary> struct2_member8,
84 9: list<test_enum1> struct2_member9
88 1: map<i16, i32> struct3_member1 = {1:2, 3:4},
89 2: map<i64, double> struct3_member2 = {10:1.1, 20:2.1},
90 3: map<string, bool> struct3_member3,
91 4: map<byte, test_enum1> struct3_member4,
92 5: map<test_enum2, test_enum3 > struct3_member5,
93 6: map<test_enum1, test_enum2> struct3_member6,
94 7: map<double, string> struct3_member7
98 1: i32 struct4_member1,
99 2: optional i32 struct4_member2
103 1: double struct5_member1,
104 2: string struct5_member2 = "Thrift Audit Test"
106 struct test_struct6 {
107 1: i32 struct6_member1,
108 2: required i32 struct6_member2
112 oneway void base_oneway(
116 1: i16 function1_arg1,
117 2: i32 function1_arg2,
118 3: i64 function1_arg3,
119 4: double function1_arg4,
120 5: string function1_arg5,
121 6: bool function1_arg6,
122 7: test_enum1 function1_arg7,
123 8: test_struct1 function1_arg8),
126 1: list<i16> function2_arg1,
127 2: list<i32> function2_arg2,
128 3: list<i64> function2_arg3,
129 4: list<double> function2_arg4,
130 5: list<string> function2_arg5,
131 6: list<bool> function2_arg6,
132 7: list<byte> function2_arg7,
133 8: list<test_enum1> function2_arg8,
134 9: list<test_struct1> function2_arg9) throws (1:test_exception2 e),
136 void base_function3(),
140 service derived1 extends base {
142 test_enum1 derived1_function1(
143 1: i64 function1_arg1,
144 2: double function1_arg2,
145 3: test_enum1 function1_arg3) throws (1:test_exception2 e),
147 i64 derived1_function2(
148 1: list<i64> function2_arg1,
149 2: list<double> function2_arg2,
150 3: list<string> function2_arg3,
151 4: list<byte> function2_arg4,
152 5: list<test_enum1> function2_arg5) throws (1:test_exception2 e),
154 double derived1_function3(
155 1: string function3_arg1,
156 2: bool function3_arg2) throws (1:test_exception2 e),
158 string derived1_function4(
159 1: string function4_arg1,
160 2: bool function4_arg2) throws (1:test_exception2 e),
163 bool derived1_function5(
164 1: map<i64, double> function5_arg1,
165 2: map<string, bool> function5_arg2,
166 3: map<test_enum1, test_enum2> function5_arg3) throws (1:test_exception2 e),
168 test_struct1 derived1_function6(
169 1: double function6_arg1) throws (1:test_exception2 e),
172 service derived2 extends base {
174 list<i32> derived2_function1(
175 1: i32 function1_arg1) throws (1:test_exception2 e),
177 list<test_enum1> derived2_function2(
178 1:i64 function2_arg2) throws (1:test_exception2 e),
180 list<test_struct1> derived2_function3(
181 1:double function3_arg1) throws(1:test_exception2 e),
183 map<double, string> derived2_function4(
184 1:string function4_arg1) throws(1:test_exception2 e),
186 map<test_enum1, test_enum2> derived2_function5(
187 1:bool function5_arg1) throws(1:test_exception2 e),
189 map<test_struct1, test_struct2> derived2_function6(
190 1:bool function6_arg1) throws(1:test_exception2 e),