blob: bf77302dea99c750885fc167d5f6a5c7f2b6706a [file] [log] [blame]
Jens Geyer363ee002020-07-15 23:44:56 +02001# 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
19namespace * Thrift5253
20
21
22// this works
23struct WorksArrrgs { 1: i32 foo }
24struct WorksRslt { 1: i32 foo }
25
26// this does not
27struct BrokenResult{ 1: i32 foo }
28struct BrokenArgs { 1: i32 foo }
29
30struct InternalStructs { 1: optional i32 foo }
31struct AsyncProcessor { 1: optional i32 foo }
32struct Client { 1: optional i32 foo }
33struct IAsync { 1: optional i32 foo }
34
35
36service MyService{
37 BrokenResult Broken( 1 : BrokenArgs foo)
38 WorksRslt Works( 1 : WorksArrrgs foo)
39
40 InternalStructs InternalStructs( 1: InternalStructs foo)
41 AsyncProcessor AsyncProcessor ( 1: AsyncProcessor foo)
42 Client Client ( 1: Client foo)
43 IAsync IAsync ( 1: IAsync foo)
44}
45