| Jens Geyer | 363ee00 | 2020-07-15 23:44:56 +0200 | [diff] [blame] | 1 | # Licensed to the Apache Software Foundation (ASF) under one | 
|  | 2 | # or more contributor license agreements.  See the NOTICE file | 
|  | 3 | # distributed with this work for additional information | 
|  | 4 | # regarding copyright ownership.  The ASF licenses this file | 
|  | 5 | # to you under the Apache License, Version 2.0 (the | 
|  | 6 | # "License"); you may not use this file except in compliance | 
|  | 7 | # with the License.  You may obtain a copy of the License at | 
|  | 8 | # | 
|  | 9 | #     http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 10 | # | 
|  | 11 | # Unless required by applicable law or agreed to in writing, software | 
|  | 12 | # distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 14 | # See the License for the specific language governing permissions and | 
|  | 15 | # limitations under the License. | 
|  | 16 |  | 
|  | 17 | // Testcase for THRIFT-5253 using Result in result name generates wrong IAsync interface | 
|  | 18 |  | 
|  | 19 | namespace * Thrift5253 | 
|  | 20 |  | 
|  | 21 |  | 
|  | 22 | // this works | 
|  | 23 | struct WorksArrrgs { 1: i32 foo } | 
|  | 24 | struct WorksRslt   { 1: i32 foo } | 
|  | 25 |  | 
|  | 26 | // this does not | 
|  | 27 | struct BrokenResult{ 1: i32 foo } | 
|  | 28 | struct BrokenArgs  { 1: i32 foo } | 
|  | 29 |  | 
|  | 30 | struct InternalStructs { 1: optional i32 foo } | 
|  | 31 | struct AsyncProcessor  { 1: optional i32 foo } | 
|  | 32 | struct Client          { 1: optional i32 foo } | 
|  | 33 | struct IAsync          { 1: optional i32 foo } | 
|  | 34 |  | 
| Jens Geyer | 23c8e52 | 2020-07-15 23:46:23 +0200 | [diff] [blame] | 35 | struct ReservedMemberName { 1: optional i32 Isset } | 
| Jens Geyer | 363ee00 | 2020-07-15 23:44:56 +0200 | [diff] [blame] | 36 |  | 
|  | 37 | service MyService{ | 
|  | 38 | BrokenResult Broken( 1 : BrokenArgs  foo) | 
|  | 39 | WorksRslt     Works( 1 : WorksArrrgs foo) | 
|  | 40 |  | 
| Jens Geyer | 23c8e52 | 2020-07-15 23:46:23 +0200 | [diff] [blame] | 41 | InternalStructs InternalStructs( 1: InternalStructs foo) | 
|  | 42 | AsyncProcessor  AsyncProcessor ( 1: AsyncProcessor  foo) | 
|  | 43 | Client          Client         ( 1: Client  foo) | 
|  | 44 | IAsync          IAsync         ( 1: IAsync  foo) | 
| Jens Geyer | 6228b90 | 2021-04-09 22:55:11 +0200 | [diff] [blame] | 45 |  | 
|  | 46 | // inconsistent treatment of methods ending in "Async" | 
|  | 47 | void TestXsync() | 
|  | 48 | void TestAsync() | 
| Jens Geyer | 363ee00 | 2020-07-15 23:44:56 +0200 | [diff] [blame] | 49 | } | 
|  | 50 |  |