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