blob: 882b03acbcb3aa21572a83e28bb3d0caffbda6cb [file] [log] [blame]
Jens Geyer731975a2014-05-02 00:24:24 +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#
19
20# We are only testing that generated code compiles, no correctness checking is done
21
22exception moderate_disaster {
23 1: i32 errorCode,
24 2: string message
25}
26
27exception total_disaster {
28 1: string message
29 2: optional bool president_was_woken_up = false
30}
31
32struct struct_a {
33 1: required i64 whatever
34}
35
36service a_serv {
Jens Geyeraaa89472014-10-03 20:22:28 +020037 void voidfunc(),
38 void void_with_1ex() throws(1: moderate_disaster err1)
39 void void_with_2ex() throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020040
Jens Geyeraaa89472014-10-03 20:22:28 +020041 string stringfunc()
42 string stringfunc_1ex() throws(1: moderate_disaster err1)
43 string stringfunc_2ex() throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020044
Jens Geyeraaa89472014-10-03 20:22:28 +020045 i64 i64func()
46 i64 i64func_1ex() throws(1: moderate_disaster err1)
47 i64 i64func_2ex() throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020048
Jens Geyeraaa89472014-10-03 20:22:28 +020049 list<string> list_of_strings_func()
50 list<string> list_of_strings_func_1ex() throws(1: moderate_disaster err1)
51 list<string> list_of_strings_func_2ex() throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020052
Jens Geyeraaa89472014-10-03 20:22:28 +020053 map<i64,string> map_func()
54 map<i64,string> map_func_1ex() throws(1: moderate_disaster err1)
55 map<i64,string> map_func_2ex() throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020056
Jens Geyeraaa89472014-10-03 20:22:28 +020057 struct_a struct_a_func()
58 struct_a struct_a_func_1ex() throws(1: moderate_disaster err1)
59 struct_a struct_a_func_2ex() throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020060
Jens Geyeraaa89472014-10-03 20:22:28 +020061 void voidfunc_1int(1: i64 i),
62 void void_with_1ex_1int(1: i64 i) throws(1: moderate_disaster err1)
63 void void_with_2ex_1int(1: i64 i) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020064
Jens Geyeraaa89472014-10-03 20:22:28 +020065 string stringfunc_1int(1: i64 i)
66 string stringfunc_1ex_1int(1: i64 i) throws(1: moderate_disaster err1)
67 string stringfunc_2ex_1int(1: i64 i) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020068
Jens Geyeraaa89472014-10-03 20:22:28 +020069 i64 i64func_1int(1: i64 i)
70 i64 i64func_1ex_1int(1: i64 i) throws(1: moderate_disaster err1)
71 i64 i64func_2ex_1int(1: i64 i) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020072
Jens Geyeraaa89472014-10-03 20:22:28 +020073 list<string> list_of_strings_func_1int(1: i64 i)
74 list<string> list_of_strings_func_1ex_1int(1: i64 i) throws(1: moderate_disaster err1)
75 list<string> list_of_strings_func_2ex_1int(1: i64 i) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020076
Jens Geyeraaa89472014-10-03 20:22:28 +020077 map<i64,string> map_func_1int(1: i64 i)
78 map<i64,string> map_func_1ex_1int(1: i64 i) throws(1: moderate_disaster err1)
79 map<i64,string> map_func_2ex_1int(1: i64 i) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020080
Jens Geyeraaa89472014-10-03 20:22:28 +020081 struct_a struct_a_func_1int(1: i64 i)
82 struct_a struct_a_func_1ex_1int(1: i64 i) throws(1: moderate_disaster err1)
83 struct_a struct_a_func_2ex_1int(1: i64 i) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020084
Jens Geyeraaa89472014-10-03 20:22:28 +020085 void voidfunc_1int_1s(1: i64 i, 2: string s),
86 void void_with_1ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1)
87 void void_with_2ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020088
Jens Geyeraaa89472014-10-03 20:22:28 +020089 string stringfunc_1int_1s(1: i64 i, 2: string s)
90 string stringfunc_1ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1)
91 string stringfunc_2ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020092
Jens Geyeraaa89472014-10-03 20:22:28 +020093 i64 i64func_1int_1s(1: i64 i, 2: string s)
94 i64 i64func_1ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1)
95 i64 i64func_2ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +020096
Jens Geyeraaa89472014-10-03 20:22:28 +020097 list<string> list_of_strings_func_1int_1s(1: i64 i, 2: string s)
98 list<string> list_of_strings_func_1ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1)
99 list<string> list_of_strings_func_2ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +0200100
Jens Geyeraaa89472014-10-03 20:22:28 +0200101 map<i64,string> map_func_1int_1s(1: i64 i, 2: string s)
102 map<i64,string> map_func_1ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1)
103 map<i64,string> map_func_2ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +0200104
Jens Geyeraaa89472014-10-03 20:22:28 +0200105 struct_a struct_a_func_1int_1s(1: i64 i, 2: string s)
106 struct_a struct_a_func_1ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1)
107 struct_a struct_a_func_2ex_1int_1s(1: i64 i, 2: string s) throws(1: moderate_disaster err1, 2:total_disaster err2)
Jens Geyer731975a2014-05-02 00:24:24 +0200108
Jens Geyeraaa89472014-10-03 20:22:28 +0200109 struct_a struct_a_func_1struct_a(1: struct_a st)
Jens Geyerfacc8dc2014-05-09 23:48:57 +0200110
Jens Geyer731975a2014-05-02 00:24:24 +0200111}