From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- src/jaegertracing/thrift/test/audit/README.md | 40 ++++ src/jaegertracing/thrift/test/audit/break1.thrift | 188 +++++++++++++++ src/jaegertracing/thrift/test/audit/break10.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break11.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break12.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break13.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break14.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break15.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break16.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break17.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break18.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break19.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break2.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break20.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break21.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break22.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break23.thrift | 192 +++++++++++++++ src/jaegertracing/thrift/test/audit/break24.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break25.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break26.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break27.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break28.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break29.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break3.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break30.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break31.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break32.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break33.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break34.thrift | 192 +++++++++++++++ src/jaegertracing/thrift/test/audit/break4.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break5.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break6.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break7.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/break8.thrift | 191 +++++++++++++++ src/jaegertracing/thrift/test/audit/break9.thrift | 190 +++++++++++++++ src/jaegertracing/thrift/test/audit/test.thrift | 189 +++++++++++++++ .../thrift/test/audit/thrift_audit_test.pl | 261 +++++++++++++++++++++ src/jaegertracing/thrift/test/audit/warning.thrift | 190 +++++++++++++++ 38 files changed, 7158 insertions(+) create mode 100644 src/jaegertracing/thrift/test/audit/README.md create mode 100644 src/jaegertracing/thrift/test/audit/break1.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break10.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break11.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break12.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break13.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break14.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break15.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break16.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break17.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break18.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break19.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break2.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break20.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break21.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break22.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break23.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break24.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break25.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break26.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break27.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break28.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break29.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break3.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break30.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break31.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break32.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break33.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break34.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break4.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break5.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break6.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break7.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break8.thrift create mode 100644 src/jaegertracing/thrift/test/audit/break9.thrift create mode 100644 src/jaegertracing/thrift/test/audit/test.thrift create mode 100644 src/jaegertracing/thrift/test/audit/thrift_audit_test.pl create mode 100644 src/jaegertracing/thrift/test/audit/warning.thrift (limited to 'src/jaegertracing/thrift/test/audit') diff --git a/src/jaegertracing/thrift/test/audit/README.md b/src/jaegertracing/thrift/test/audit/README.md new file mode 100644 index 000000000..412f8d5b6 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/README.md @@ -0,0 +1,40 @@ +Typical usage +============= +``` +thrift.exe --audit +``` +Example run +=========== +``` +> thrift.exe --audit test.thrift break1.thrift +[Thrift Audit Failure:break1.thrift] New Thrift File has missing function base_function3 +[Thrift Audit Warning:break1.thrift] Constant const3 has different value +``` + +Problems that the audit tool can catch +====================================== +Errors +* Removing an enum value +* Changing the type of a struct field +* Changing the required-ness of a struct field +* Removing a struct field +* Adding a required struct field +* Adding a struct field 'in the middle'. This usually indicates an old ID has been recycled +* Struct removed +* Oneway-ness change +* Return type change +* Missing function +* Missing service +* Change in service inheritance + +Warnings +* Removing a language namespace declaration +* Changing a namespace +* Changing an enum value's name +* Removing an enum class +* Default value changed +* Struct field name change +* Removed constant +* Type of constant changed +* Value of constant changed + \ No newline at end of file diff --git a/src/jaegertracing/thrift/test/audit/break1.thrift b/src/jaegertracing/thrift/test/audit/break1.thrift new file mode 100644 index 000000000..f77f67224 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break1.thrift @@ -0,0 +1,188 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//Thrift Method removed from service base. + +namespace cpp test + +//constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3= [23, 32], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break10.thrift b/src/jaegertracing/thrift/test/audit/break10.thrift new file mode 100644 index 000000000..00690aaf5 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break10.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break10 - Struct field removed from struct2 id =1 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break11.thrift b/src/jaegertracing/thrift/test/audit/break11.thrift new file mode 100644 index 000000000..a4e0a7d2f --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break11.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break11 - Struct field removed from struct3 id =7 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break12.thrift b/src/jaegertracing/thrift/test/audit/break12.thrift new file mode 100644 index 000000000..e5522edc7 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break12.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// derived1_function1 return type changed from enum1 to enum2 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum2 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break13.thrift b/src/jaegertracing/thrift/test/audit/break13.thrift new file mode 100644 index 000000000..66975cd0f --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break13.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// derived1_function6 return type changed from struct1 to struct2 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct2 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break14.thrift b/src/jaegertracing/thrift/test/audit/break14.thrift new file mode 100644 index 000000000..4ccd503c0 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break14.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// derived1_function6 return type changed from string to double + +namespace cpp test +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + double derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break15.thrift b/src/jaegertracing/thrift/test/audit/break15.thrift new file mode 100644 index 000000000..95f69e6a4 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break15.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// break15 - derived2_function1 return type changed from list to list +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break16.thrift b/src/jaegertracing/thrift/test/audit/break16.thrift new file mode 100644 index 000000000..cdcff7d88 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break16.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// break 16 - derived2_function5 return type changed from map to map + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break17.thrift b/src/jaegertracing/thrift/test/audit/break17.thrift new file mode 100644 index 000000000..353b1422c --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break17.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break17 - derived2_function6 return type changed from map to map + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break18.thrift b/src/jaegertracing/thrift/test/audit/break18.thrift new file mode 100644 index 000000000..c778b6a0c --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break18.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break18- oneway removed from base_oneway + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break19.thrift b/src/jaegertracing/thrift/test/audit/break19.thrift new file mode 100644 index 000000000..1a0b2296d --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break19.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break19 - oneway added to base_function1 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + oneway void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break2.thrift b/src/jaegertracing/thrift/test/audit/break2.thrift new file mode 100644 index 000000000..6f4fe2dd2 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break2.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//Struct field changed in test_struct1 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i32 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break20.thrift b/src/jaegertracing/thrift/test/audit/break20.thrift new file mode 100644 index 000000000..9ae5f001e --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break20.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// break 20 - first enum value removed from enum1 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break21.thrift b/src/jaegertracing/thrift/test/audit/break21.thrift new file mode 100644 index 000000000..f7da40022 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break21.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break21- last enum value removed from enum2 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break22.thrift b/src/jaegertracing/thrift/test/audit/break22.thrift new file mode 100644 index 000000000..38083494d --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break22.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break22 - in-between enum value removed from enum1 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break23.thrift b/src/jaegertracing/thrift/test/audit/break23.thrift new file mode 100644 index 000000000..ff95a426f --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break23.thrift @@ -0,0 +1,192 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break23 - required struct field added to struct4 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2, + 3: required i64 struct4_member3 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break24.thrift b/src/jaegertracing/thrift/test/audit/break24.thrift new file mode 100644 index 000000000..bb4d5b933 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break24.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break24 - removed inheritance from derived1. + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break25.thrift b/src/jaegertracing/thrift/test/audit/break25.thrift new file mode 100644 index 000000000..6efe97e65 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break25.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//Changed inheritance of derived2 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends derived1 { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break26.thrift b/src/jaegertracing/thrift/test/audit/break26.thrift new file mode 100644 index 000000000..6576d9b62 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break26.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break26 - Field type changed in base_function1 argument id=3 +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: double function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} + diff --git a/src/jaegertracing/thrift/test/audit/break27.thrift b/src/jaegertracing/thrift/test/audit/break27.thrift new file mode 100644 index 000000000..b556706d8 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break27.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// break27 - argument changed base_function2 list to list id =8 +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break28.thrift b/src/jaegertracing/thrift/test/audit/break28.thrift new file mode 100644 index 000000000..c64e55808 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break28.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break28- derived1_function5 arguement type changed map to list +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: list function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break29.thrift b/src/jaegertracing/thrift/test/audit/break29.thrift new file mode 100644 index 000000000..52f308113 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break29.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break29 - base_function2 arguemnt type changed list to string + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: string function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break3.thrift b/src/jaegertracing/thrift/test/audit/break3.thrift new file mode 100644 index 000000000..ded9972d8 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break3.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break3 - Struct field changed in test_struct1(enum1 to enum2) + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum2 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break30.thrift b/src/jaegertracing/thrift/test/audit/break30.thrift new file mode 100644 index 000000000..818dd6e47 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break30.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// break30- derived1_function6 argument changed struct1 to map +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + map derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break31.thrift b/src/jaegertracing/thrift/test/audit/break31.thrift new file mode 100644 index 000000000..7ca380461 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break31.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break31 - Exception removed to base_function2 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break32.thrift b/src/jaegertracing/thrift/test/audit/break32.thrift new file mode 100644 index 000000000..ca3f8a8b3 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break32.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break32- Exception1 field type changed for id =1 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i64 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break33.thrift b/src/jaegertracing/thrift/test/audit/break33.thrift new file mode 100644 index 000000000..42dbb8247 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break33.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break33 - derived1_function1 exception type changed. + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception1 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break34.thrift b/src/jaegertracing/thrift/test/audit/break34.thrift new file mode 100644 index 000000000..af93e650d --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break34.thrift @@ -0,0 +1,192 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break34 - Field added to struct with Field ID being in between two existing field IDs + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 6: map struct3_member6, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break4.thrift b/src/jaegertracing/thrift/test/audit/break4.thrift new file mode 100644 index 000000000..6a28ec05b --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break4.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//Field type changed in test_struct1(bool to string) +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: string struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 =[23, 32], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break5.thrift b/src/jaegertracing/thrift/test/audit/break5.thrift new file mode 100644 index 000000000..18c22d169 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break5.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// member field type changed in test_struct1(bool to list) + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: list struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break6.thrift b/src/jaegertracing/thrift/test/audit/break6.thrift new file mode 100644 index 000000000..9b7a3004a --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break6.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Field type changed in test_struct2 (list to list) + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break7.thrift b/src/jaegertracing/thrift/test/audit/break7.thrift new file mode 100644 index 000000000..b31c2dff1 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break7.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break7 - requiredness removed in struct6 + +namespace cpp test +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break8.thrift b/src/jaegertracing/thrift/test/audit/break8.thrift new file mode 100644 index 000000000..9acac09eb --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break8.thrift @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break8 - requiredness addedd in struct5 + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: required string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/break9.thrift b/src/jaegertracing/thrift/test/audit/break9.thrift new file mode 100644 index 000000000..62b319d6e --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/break9.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//break9 - Struct field removed from struct1 + + +namespace cpp test +//Constants + +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/test.thrift b/src/jaegertracing/thrift/test/audit/test.thrift new file mode 100644 index 000000000..e9834b38f --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/test.thrift @@ -0,0 +1,189 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +namespace cpp test + +//Constants +const i32 const1 = 123; +const double const2 = 23.3; +const map const3 = {"hello":"world", "thrift":"audit"}; + + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.5, + 5: string struct1_member5 = "Audit test", + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 struct1_member9 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list struct2_member2, + 3: list struct2_member3 = [23, 32 ], + 4: list struct2_member4, + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:2, 3:4}, + 2: map struct3_member2 = {10:1.1, 20:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1, + 2: string struct5_member2 = "Thrift Audit Test" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base { + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} diff --git a/src/jaegertracing/thrift/test/audit/thrift_audit_test.pl b/src/jaegertracing/thrift/test/audit/thrift_audit_test.pl new file mode 100644 index 000000000..69ed4dccc --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/thrift_audit_test.pl @@ -0,0 +1,261 @@ +#!/usr/bin/perl -w + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + + +#break1 - Thrift method removed from service base +#break2 - Struct field changed in test_struct1(i16 to i32) +#break3 - Struct field changed in test_struct1(enum1 to enum2) +#break4 - Field type changed in test_struct1(bool to string) +#break5- member field type changed in test_struct1(bool to list) +#break6- Field type changed in test_struct2 (list to list) +#break7 - requiredness removed in struct6 +#break8 - requiredness addedd in struct5 +#break9 - Struct field removed from struct1 +#break10 - Struct field removed from struct2 id = 1 +#break11 - Struct field removed from struct3 last id +#break12 - derived1_function1 return type changed from enum1 to enum2 +#break13 - derived1_function6 return type changed from struct1 to struct2 +#break14 - derived1_function4 return type changed from string to double +#break15 - derived2_function1 return type changed from list to list +#break16 - derived2_function5 return type changed from map to map +#break17 - derived2_function6 return type changed from map to map +#break18- oneway removed from base_oneway +#break19 - oneway added to base_function1 +#break20 - first enum value removed from enum1 +#break21- last enum value removed from enum2 +#break22 - in-between enum value removed from enum1 +#break23 - required struct field added to struct4 +#break24 - removed inheritance of derived1. +#break25 - changed inheritance of derived2. +#break26 - Field type changed in base_function1 argument id=3 +#break27 - argument changed base_function2 list to list id =8 +#break28- derived1_function5 arguement type changed map to list +#break29 - base_function2 arguemnt type changed list to string +#break30- derived1_function6 argument changed struct1 to map +#break31 - Exception removed to base_function2 +#break32- Exception1 field type changed for id =1 +#break33 - derived1_function1 exception type changed. +#break34 - Field added to struct with Field ID being in between two existing field IDs + +#warning.thrift +#Changing defaults +#Id=1 struct5 +#id=2 struct5 +#id=4 struct2(list) +#id=3 struct2(list default values removed) +#id 4 struct1 change in double value +#id 5 struct1 (default string value removed) +#id=1 struct3 (change in map values) +#id2 struct3 (change in map keys) + +#change in inheritance for derived1 and derived2 + +#change in struct field names +#id9 struct1 +#id2 struct2 + +use strict; +use warnings; +use Getopt::Std; + +# globals +my $gArguments = ""; # arguments that will be passed to AuditTool +my $gAuditToolPath = ""; +my $gPreviousThriftPath; # previous thrift path +my $gCurrentThriftPath; # current thrift path +my $gThriftFileFolder; +my $gBreakingFilesCount =34; + +my $gVerbose = 0; +#functions +sub auditBreakingChanges; +sub auditNonBreakingChanges; + +main(); + +sub main +{ + parseOptions(); + auditBreakingChanges(); + auditNonBreakingChanges(); +} + +sub parseOptions +{ + my %options = (); + if ( getopts ('vf:o:t:',\%options) ) + { + # current (new) thrift folder + if ($options{'f'}) + { + $gThriftFileFolder = $options{'f'}; + $gPreviousThriftPath = $gThriftFileFolder."/test.thrift"; + } + else + { + die "Missing Folder containing thrift files\n"; + } + + if($options{'t'}) + { + $gAuditToolPath = $options{'t'}; + } + else + { + die "Audit Tool Path required \n"; + } + + if ($options{'v'}) + { + $gVerbose = 1; + } + + } +} + +sub auditBreakingChanges +{ + my $breakingFileBaseName = $gThriftFileFolder."/break"; + my $newThriftFile; + for(my $i=1; $i <= $gBreakingFilesCount; $i++) + { + $newThriftFile = $breakingFileBaseName."$i.thrift"; + my $arguments = $gPreviousThriftPath." ".$newThriftFile; + my ($exitCode, $output) = callThriftAuditTool($arguments); + print $output if $gVerbose eq 1; + + if($exitCode == 1) + { + # thrift_audit returns 1 when it is not able to find files or other non-audit failures + print "exiting with exit code =1 i = ".$i."\n"; + print $output; + exit $exitCode; + } + if($exitCode != 2) + { + # thrift-audit return 2 for audit failures. So for Breaking changes we should get 2 as return value. + print $output; + die "\nTEST FAILURE: Breaking Change not detected for thrift file $newThriftFile, code=$exitCode \n"; + } + if(index($output,getMessageSubString("break$i")) == -1) + { + #Audit tool detected failure, but not the expected one. The change in breaking thrift file does not match getMessageSubString() + print $output; + die "\nTest FAILURE: Audit tool detected failure, but not the expected one!\n"; + } + else + { + #Thrift audit tool has detected audit failure and has returned exited to status code 2 + print "Test Pass: Audit Failure detected for thrift file break$i.thrift \n"; + } + } + +} + +sub auditNonBreakingChanges +{ + my $breakingFileBaseName = $gThriftFileFolder."/warning"; + my $newThriftFile; + $newThriftFile = $breakingFileBaseName.".thrift"; + my $arguments = $gPreviousThriftPath." ".$newThriftFile; + my ($exitCode, $output) = callThriftAuditTool($arguments); + print $output if $gVerbose eq 1; + + if($exitCode == 1) + { + # thrift_audit returns 1 when it is not able to find files or other non-audit failures + print "exiting with exit code = 1 for file warning.thrift\n"; + exit $exitCode; + } + elsif($exitCode != 0) + { + # thrift-audit return 0 if there are no audit failures. + die "\nTEST FAILURE: Non Breaking changes returned failure for thrift file $newThriftFile \n"; + } + else + { + #Thrift audit tool has exited with status 0. + print "Test Pass: Audit tool exits with success for warnings \n"; + } + + +} + +# ----------------------------------------------------------------------------------------------------- +# call thriftAuditTool script +sub callThriftAuditTool ( $ ) +{ + my $args = shift; + + my $command = "$gAuditToolPath --audit $args"; + my $output = `$command 2>&1`; + my $exitCode = $? >> 8; + + return ($exitCode,$output); +} + +sub getMessageSubString( $ ) +{ + my $fileName = shift; + my %lookupTable = ( + "break1" => "base_function3", + "break2" => "test_struct1", + "break3" => "test_struct1", + "break4" => "test_struct1", + "break5" => "test_struct1", + "break6" => "test_struct2", + "break7" => "test_struct6", + "break8" => "test_struct5", + "break9" => "test_struct1", + "break10" => "test_struct2", + "break11" => "test_struct3", + "break12" => "derived1_function1", + "break13" => "derived1_function6", + "break14" => "derived1_function4", + "break15" => "derived2_function1", + "break16" => "derived2_function5", + "break17" => "derived2_function6", + "break18" => "base_oneway", + "break19" => "base_function1", + "break20" => "test_enum1", + "break21" => "test_enum2", + "break22" => "test_enum1", + "break23" => "test_struct4", + "break24" => "derived1", + "break25" => "derived2", + "break26" => "base_function1", + "break27" => "base_function2_args", + "break28" => "derived1_function5_args", + "break29" => "base_function2_args", + "break30" => "derived1_function6", + "break31" => "base_function2_exception", + "break32" => "test_exception1", + "break33" => "derived1_function1_exception", + "break34" => "test_struct3", + ); + if (not exists $lookupTable{ $fileName }) + { + print "in the null case\n"; + return "NULL"; + } + + my $retval = $lookupTable{ $fileName }; + print "$fileName => $retval\n"; + return $lookupTable{ $fileName }; +} diff --git a/src/jaegertracing/thrift/test/audit/warning.thrift b/src/jaegertracing/thrift/test/audit/warning.thrift new file mode 100644 index 000000000..5392d5cc5 --- /dev/null +++ b/src/jaegertracing/thrift/test/audit/warning.thrift @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +namespace cpp test + +//Constants + +const i32 const1 = 123; +const double const2 = 23.2; +const map const3 = {"hello":"class", "thrift":"audit"}; + +//Exception +exception test_exception1 { + 1: i32 code; + 2: string json; +} +exception test_exception2 { + 1: i32 code; + 2: string json; +} + +//Enums + +enum test_enum1 { + enum1_value0 = 0, + enum1_value1 = 1, + enum1_value2 = 2, + enum1_value5 = 5, + enum1_value7 = 7, + enum1_value8 = 8 +} + +enum test_enum2 { + enum2_value0 = 0, + enum2_value1 = 1, + enum2_value2 = 2, + enum2_value3 = 3 +} + +enum test_enum3 { + enum3_value1 = 0, + enum3_value2 = 1 +} + +struct test_struct1 { + 1: i16 struct1_member1, + 2: i32 struct1_member2, + 3: i64 struct1_member3, + 4: double struct1_member4 = 2.4, + 5: string struct1_member5, + 6: bool struct1_member6, + 7: byte struct1_member7, + 8: binary struct1_member8, + 9: test_enum1 changed19 +} + +struct test_struct2 { + 1: list struct2_member1, + 2: list changed22, + 3: list struct2_member3, + 4: list struct2_member4 =[1.0, 2.1], + 5: list struct2_member5, + 6: list struct2_member6, + 7: list struct2_member7, + 8: list struct2_member8, + 9: list struct2_member9 +} + +struct test_struct3 { + 1: map struct3_member1 = {1:10, 2:20}, + 2: map struct3_member2 = {1:1.1, 2:2.1}, + 3: map struct3_member3, + 4: map struct3_member4, + 5: map struct3_member5, + 7: map struct3_member7 +} + +struct test_struct4 { + 1: i32 struct4_member1, + 2: optional i32 struct4_member2 +} + +struct test_struct5{ + 1: double struct5_member1 = 1.1, + 2: string struct5_member2 = "Thrift Audit Tess" +} +struct test_struct6 { + 1: i32 struct6_member1, + 2: required i32 struct6_member2 +} + +service base { + oneway void base_oneway( + 1: i32 arg1), + + void base_function1( + 1: i16 function1_arg1, + 2: i32 function1_arg2, + 3: i64 function1_arg3, + 4: double function1_arg4, + 5: string function1_arg5, + 6: bool function1_arg6, + 7: test_enum1 function1_arg7, + 8: test_struct1 function1_arg8), + + void base_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5, + 6: list function2_arg6, + 7: list function2_arg7, + 8: list function2_arg8, + 9: list function2_arg9) throws (1:test_exception2 e), + + void base_function3(), + +} + +service derived1 extends base{ + + test_enum1 derived1_function1( + 1: i64 function1_arg1, + 2: double function1_arg2, + 3: test_enum1 function1_arg3) throws (1:test_exception2 e), + + i64 derived1_function2( + 1: list function2_arg1, + 2: list function2_arg2, + 3: list function2_arg3, + 4: list function2_arg4, + 5: list function2_arg5) throws (1:test_exception2 e), + + double derived1_function3( + 1: string function3_arg1, + 2: bool function3_arg2) throws (1:test_exception2 e), + + string derived1_function4( + 1: string function4_arg1, + 2: bool function4_arg2) throws (1:test_exception2 e), + + + bool derived1_function5( + 1: map function5_arg1, + 2: map function5_arg2, + 3: map function5_arg3) throws (1:test_exception2 e), + + test_struct1 derived1_function6( + 1: double function6_arg1) throws (1:test_exception2 e), +} + +service derived2 extends base { + + list derived2_function1( + 1: i32 function1_arg1) throws (1:test_exception2 e), + + list derived2_function2( + 1:i64 function2_arg2) throws (1:test_exception2 e), + + list derived2_function3( + 1:double function3_arg1) throws(1:test_exception2 e), + + map derived2_function4( + 1:string function4_arg1) throws(1:test_exception2 e), + + map derived2_function5( + 1:bool function5_arg1) throws(1:test_exception2 e), + + map derived2_function6( + 1:bool function6_arg1) throws(1:test_exception2 e), + +} -- cgit v1.2.3