blob: 224ac8574d92aa9e0c873e68249b07677f31069e [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
Jens Geyer23c8e522020-07-15 23:46:23 +020035struct ReservedMemberName { 1: optional i32 Isset }
Jens Geyer363ee002020-07-15 23:44:56 +020036
37service MyService{
38 BrokenResult Broken( 1 : BrokenArgs foo)
39 WorksRslt Works( 1 : WorksArrrgs foo)
40
Jens Geyer23c8e522020-07-15 23:46:23 +020041 InternalStructs InternalStructs( 1: InternalStructs foo)
42 AsyncProcessor AsyncProcessor ( 1: AsyncProcessor foo)
43 Client Client ( 1: Client foo)
44 IAsync IAsync ( 1: IAsync foo)
Jens Geyer6228b902021-04-09 22:55:11 +020045
46 // inconsistent treatment of methods ending in "Async"
47 void TestXsync()
48 void TestAsync()
Jens Geyer363ee002020-07-15 23:44:56 +020049}
50