summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJens Geyer <jensg@apache.org>2022-06-13 23:37:25 +0200
committerJens Geyer <jensg@apache.org>2022-09-05 22:04:22 +0200
commitf066d84ffb7fe2eb0dc3b7e7cd0d0417a1ae7963 (patch)
treed47baa7d0dea62a354eb0ededf77715d6cf7aa33 /test
parent3f4fa2947dc6e049e0f4748bdb6142b0c4673164 (diff)
downloadthrift-f066d84ffb7fe2eb0dc3b7e7cd0d0417a1ae7963.tar.gz
Replace ThriftTest.thrift with v0.16/ThriftTest.thrift to allow for merging the partially completed uuid implementation to master
Diffstat (limited to 'test')
-rw-r--r--test/Include.thrift2
-rw-r--r--test/Makefile.am2
-rw-r--r--test/ReuseObjects.thrift2
-rw-r--r--test/c_glib/CMakeLists.txt2
-rw-r--r--test/c_glib/Makefile.am2
-rw-r--r--test/cpp/CMakeLists.txt2
-rw-r--r--test/cpp/Makefile.am2
-rw-r--r--test/crossrunner/util.py2
-rw-r--r--test/dart/Makefile.am4
-rw-r--r--test/erl/Makefile.am2
-rw-r--r--test/go/Makefile.am2
-rw-r--r--test/lua/Makefile.am2
-rw-r--r--test/perl/Makefile.am4
-rw-r--r--test/php/Makefile.am8
-rw-r--r--test/py.tornado/Makefile.am4
-rw-r--r--test/py.twisted/Makefile.am4
-rw-r--r--test/py/Makefile.am32
-rw-r--r--test/py/generate.cmake28
-rw-r--r--test/rb/Makefile.am4
-rw-r--r--test/rs/Makefile.am4
-rw-r--r--test/v0.16/ConstantsDemo.thrift76
-rw-r--r--test/v0.16/DebugProtoTest.thrift393
-rw-r--r--test/v0.16/ThriftTest.thrift418
23 files changed, 953 insertions, 48 deletions
diff --git a/test/Include.thrift b/test/Include.thrift
index 562319b2f..f61cf0506 100644
--- a/test/Include.thrift
+++ b/test/Include.thrift
@@ -17,7 +17,7 @@
* under the License.
*/
-include "ThriftTest.thrift"
+include "v0.16/ThriftTest.thrift"
struct IncludeTest {
1: required ThriftTest.Bools bools
diff --git a/test/Makefile.am b/test/Makefile.am
index da3cbb1cd..df3a23cbf 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -139,6 +139,7 @@ EXTRA_DIST = \
BrokenConstants.thrift \
ConstantsDemo.thrift \
DebugProtoTest.thrift \
+ v0.16/DebugProtoTest.thrift \
DenseLinkingTest.thrift \
DocTest.thrift \
DoubleConstantsTest.thrift \
@@ -158,6 +159,7 @@ EXTRA_DIST = \
SmallTest.thrift \
StressTest.thrift \
ThriftTest.thrift \
+ v0.16/ThriftTest.thrift \
TypedefTest.thrift \
Types.thrift \
UnsafeTypes.thrift \
diff --git a/test/ReuseObjects.thrift b/test/ReuseObjects.thrift
index 2dd6c6ec3..1dd36cd87 100644
--- a/test/ReuseObjects.thrift
+++ b/test/ReuseObjects.thrift
@@ -21,7 +21,7 @@
namespace java thrift.test
-include "ThriftTest.thrift"
+include "v0.16/ThriftTest.thrift"
struct Reuse {
1: i32 val1;
diff --git a/test/c_glib/CMakeLists.txt b/test/c_glib/CMakeLists.txt
index 410774d78..ecbd2aeb3 100644
--- a/test/c_glib/CMakeLists.txt
+++ b/test/c_glib/CMakeLists.txt
@@ -56,5 +56,5 @@ target_link_libraries(test_client crosstestgencglib "${OPENSSL_LIBRARIES}")
#
add_custom_command(OUTPUT gen-c_glib/t_test_second_service.c gen-c_glib/t_test_second_service.h gen-c_glib/t_test_thrift_test.c gen-c_glib/t_test_thrift_test.h gen-c_glib/t_test_thrift_test_types.c gen-c_glib/t_test_thrift_test_types.h
- COMMAND ${THRIFT_COMPILER} --gen c_glib -r ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
+ COMMAND ${THRIFT_COMPILER} --gen c_glib -r ${PROJECT_SOURCE_DIR}/test/v0.16/ThriftTest.thrift
)
diff --git a/test/c_glib/Makefile.am b/test/c_glib/Makefile.am
index 98a373498..f55a977d4 100644
--- a/test/c_glib/Makefile.am
+++ b/test/c_glib/Makefile.am
@@ -56,7 +56,7 @@ test_server_LDADD = \
#
# Common thrift code generation rules
#
-gen-c_glib/t_test_second_service.c gen-c_glib/t_test_second_service.h gen-c_glib/t_test_thrift_test.c gen-c_glib/t_test_thrift_test.h gen-c_glib/t_test_thrift_test_types.c gen-c_glib/t_test_thrift_test_types.h: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT)
+gen-c_glib/t_test_second_service.c gen-c_glib/t_test_second_service.h gen-c_glib/t_test_thrift_test.c gen-c_glib/t_test_thrift_test.h gen-c_glib/t_test_thrift_test_types.c gen-c_glib/t_test_thrift_test_types.h: $(top_srcdir)/test/v0.16/ThriftTest.thrift $(THRIFT)
$(THRIFT) --gen c_glib -r $<
AM_CFLAGS = -g -Wall -Wextra $(GLIB_CFLAGS) $(GOBJECT_CFLAGS)
diff --git a/test/cpp/CMakeLists.txt b/test/cpp/CMakeLists.txt
index a6c1fd5cf..f693a273d 100644
--- a/test/cpp/CMakeLists.txt
+++ b/test/cpp/CMakeLists.txt
@@ -100,7 +100,7 @@ add_test(NAME SpecificNameTest COMMAND SpecificNameTest)
#
add_custom_command(OUTPUT gen-cpp/SecondService.cpp gen-cpp/SecondService.h gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest.h gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp
- COMMAND ${THRIFT_COMPILER} --gen cpp:templates,cob_style -r ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
+ COMMAND ${THRIFT_COMPILER} --gen cpp:templates,cob_style -r ${PROJECT_SOURCE_DIR}/test/v0.16/ThriftTest.thrift
)
add_custom_command(OUTPUT gen-cpp/Service.cpp
diff --git a/test/cpp/Makefile.am b/test/cpp/Makefile.am
index d3754f478..9e8b6765b 100644
--- a/test/cpp/Makefile.am
+++ b/test/cpp/Makefile.am
@@ -97,7 +97,7 @@ StressTestNonBlocking_LDADD = \
#
# Common thrift code generation rules
#
-gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/SecondService.cpp gen-cpp/SecondService.h gen-cpp/SecondService.tcc: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT)
+gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/SecondService.cpp gen-cpp/SecondService.h gen-cpp/SecondService.tcc: $(top_srcdir)/test/v0.16/ThriftTest.thrift $(THRIFT)
$(THRIFT) --gen cpp:templates,cob_style -r $<
gen-cpp/Service.cpp: $(top_srcdir)/test/StressTest.thrift $(THRIFT)
diff --git a/test/crossrunner/util.py b/test/crossrunner/util.py
index c214df85a..8511f5832 100644
--- a/test/crossrunner/util.py
+++ b/test/crossrunner/util.py
@@ -21,7 +21,7 @@ import copy
def domain_socket_path(port):
- return '/tmp/ThriftTest.thrift.%d' % port
+ return '/tmp/v0.16/ThriftTest.thrift.%d' % port
def merge_dict(base, update):
diff --git a/test/dart/Makefile.am b/test/dart/Makefile.am
index 27fdc099f..81f2f5b10 100644
--- a/test/dart/Makefile.am
+++ b/test/dart/Makefile.am
@@ -17,8 +17,8 @@
# under the License.
#
-gen-dart/thrift_test/lib/thrift_test.dart: ../ThriftTest.thrift
- $(THRIFT) --gen dart ../ThriftTest.thrift
+gen-dart/thrift_test/lib/thrift_test.dart: ../v0.16/ThriftTest.thrift
+ $(THRIFT) --gen dart ../v0.16/ThriftTest.thrift
pub-get-gen: gen-dart/thrift_test/lib/thrift_test.dart
cd gen-dart/thrift_test; ${DARTPUB} get
diff --git a/test/erl/Makefile.am b/test/erl/Makefile.am
index 145a76354..5bc90fa88 100644
--- a/test/erl/Makefile.am
+++ b/test/erl/Makefile.am
@@ -25,7 +25,7 @@ ERL_FLAG = erl
for f in $(THRIFT_FILES) ; do \
$(THRIFT) --gen $(ERL_FLAG) -o src $$f ; \
done ; \
- $(THRIFT) --gen $(ERL_FLAG) -o src ../ThriftTest.thrift
+ $(THRIFT) --gen $(ERL_FLAG) -o src ../v0.16/ThriftTest.thrift
touch .generated
precross: .generated
diff --git a/test/go/Makefile.am b/test/go/Makefile.am
index ef00df3a2..32c2be0d9 100644
--- a/test/go/Makefile.am
+++ b/test/go/Makefile.am
@@ -26,7 +26,7 @@ GOINSTALLEXTRA =
endif
THRIFTCMD = $(THRIFT) -out src/gen --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/test/go/src/gen/$(COMPILER_EXTRAFLAG)
-THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
+THRIFTTEST = $(top_srcdir)/test/v0.16/ThriftTest.thrift
precross: bin/testclient bin/testserver
diff --git a/test/lua/Makefile.am b/test/lua/Makefile.am
index b2683e1b9..a3ab3e26a 100644
--- a/test/lua/Makefile.am
+++ b/test/lua/Makefile.am
@@ -20,7 +20,7 @@
THRIFT = $(top_builddir)/compiler/cpp/thrift
# Remove "MapType =" line to ignore some map bug for now
-stubs: ../ThriftTest.thrift $(THRIFT)
+stubs: ../v0.16/ThriftTest.thrift $(THRIFT)
$(THRIFT) --gen lua $<
$(SED) -i.bak 's/MapType =//g' gen-lua/ThriftTest_ttypes.lua
$(RM) gen-lua/ThriftTest_ttypes.lua.bak
diff --git a/test/perl/Makefile.am b/test/perl/Makefile.am
index 1dbaf28b0..589fe624b 100644
--- a/test/perl/Makefile.am
+++ b/test/perl/Makefile.am
@@ -17,8 +17,8 @@
# under the License.
#
-stubs: ../ThriftTest.thrift
- $(THRIFT) --gen perl ../ThriftTest.thrift
+stubs: ../v0.16/ThriftTest.thrift
+ $(THRIFT) --gen perl ../v0.16/ThriftTest.thrift
precross: stubs
diff --git a/test/php/Makefile.am b/test/php/Makefile.am
index 9e13affa1..b1ac68683 100644
--- a/test/php/Makefile.am
+++ b/test/php/Makefile.am
@@ -17,11 +17,11 @@
# under the License.
#
-stubs: ../ThriftTest.thrift
- $(THRIFT) --gen php ../ThriftTest.thrift
- $(THRIFT) --gen php:inlined ../ThriftTest.thrift
+stubs: ../v0.16/ThriftTest.thrift
+ $(THRIFT) --gen php ../v0.16/ThriftTest.thrift
+ $(THRIFT) --gen php:inlined ../v0.16/ThriftTest.thrift
$(MKDIR_P) gen-php-classmap
- $(THRIFT) -out gen-php-classmap --gen php:classmap ../ThriftTest.thrift
+ $(THRIFT) -out gen-php-classmap --gen php:classmap ../v0.16/ThriftTest.thrift
php_ext_dir:
mkdir -p php_ext_dir
diff --git a/test/py.tornado/Makefile.am b/test/py.tornado/Makefile.am
index e962f0cfc..3b78793f7 100644
--- a/test/py.tornado/Makefile.am
+++ b/test/py.tornado/Makefile.am
@@ -19,8 +19,8 @@
THRIFT = $(top_srcdir)/compiler/cpp/thrift
-thrift_gen: ../ThriftTest.thrift ../SmallTest.thrift
- $(THRIFT) --gen py:tornado ../ThriftTest.thrift
+thrift_gen: ../v0.16/ThriftTest.thrift ../SmallTest.thrift
+ $(THRIFT) --gen py:tornado ../v0.16/ThriftTest.thrift
$(THRIFT) --gen py:tornado ../SmallTest.thrift
check: thrift_gen
diff --git a/test/py.twisted/Makefile.am b/test/py.twisted/Makefile.am
index dee8e2f69..bd0cdb1a4 100644
--- a/test/py.twisted/Makefile.am
+++ b/test/py.twisted/Makefile.am
@@ -19,8 +19,8 @@
TRIAL ?= trial
-stubs: ../ThriftTest.thrift ../SmallTest.thrift
- $(THRIFT) --gen py:twisted ../ThriftTest.thrift
+stubs: ../v0.16/ThriftTest.thrift ../SmallTest.thrift
+ $(THRIFT) --gen py:twisted ../v0.16/ThriftTest.thrift
$(THRIFT) --gen py:twisted ../SmallTest.thrift
check: stubs
diff --git a/test/py/Makefile.am b/test/py/Makefile.am
index 57529d733..7c78f17da 100644
--- a/test/py/Makefile.am
+++ b/test/py/Makefile.am
@@ -71,35 +71,51 @@ TESTS= $(py_unit_tests)
gen-py/%/__init__.py: ../%.thrift $(THRIFT)
- $(THRIFT) --gen py $<
+ test -f ../v0.16/$(notdir $<) \
+ && $(THRIFT) --gen py ../v0.16/$(notdir $<) \
+ || $(THRIFT) --gen py $<
gen-py-default/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-default || $(MKDIR_P) gen-py-default
- $(THRIFT) --gen py -out gen-py-default $<
+ test -f ../v0.16/$(notdir $<) \
+ && $(THRIFT) --gen py -out gen-py-default ../v0.16/$(notdir $<) \
+ || $(THRIFT) --gen py -out gen-py-default $<
gen-py-slots/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-slots || $(MKDIR_P) gen-py-slots
- $(THRIFT) --gen py:slots -out gen-py-slots $<
+ test ../v0.16/$(notdir $<) \
+ && $(THRIFT) --gen py:slots -out gen-py-slots ../v0.16/$(notdir $<) \
+ || $(THRIFT) --gen py:slots -out gen-py-slots $<
gen-py-oldstyle/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-oldstyle || $(MKDIR_P) gen-py-oldstyle
- $(THRIFT) --gen py:old_style -out gen-py-oldstyle $<
+ test ../v0.16/$(notdir $<) \
+ && $(THRIFT) --gen py:old_style -out gen-py-oldstyle ../v0.16/$(notdir $<) \
+ || $(THRIFT) --gen py:old_style -out gen-py-oldstyle $<
gen-py-no_utf8strings/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-no_utf8strings || $(MKDIR_P) gen-py-no_utf8strings
- $(THRIFT) --gen py:no_utf8strings -out gen-py-no_utf8strings $<
+ test ../v0.16/$(notdir $<) \
+ && $(THRIFT) --gen py:no_utf8strings -out gen-py-no_utf8strings ../v0.16/$(notdir $<) \
+ || $(THRIFT) --gen py:no_utf8strings -out gen-py-no_utf8strings $<
gen-py-dynamic/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-dynamic || $(MKDIR_P) gen-py-dynamic
- $(THRIFT) --gen py:dynamic -out gen-py-dynamic $<
+ test ../v0.16/$(notdir $<) \
+ && $(THRIFT) --gen py:dynamic -out gen-py-dynamic ../v0.16/$(notdir $<) \
+ || $(THRIFT) --gen py:dynamic -out gen-py-dynamic $<
gen-py-dynamicslots/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-dynamicslots || $(MKDIR_P) gen-py-dynamicslots
- $(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots $<
+ test ../v0.16/$(notdir $<) \
+ && $(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots ../v0.16/$(notdir $<) \
+ || $(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots $<
gen-py-enum/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-enum || $(MKDIR_P) gen-py-enum
- $(THRIFT) --gen py:enum -out gen-py-enum $<
+ test ../v0.16/$(notdir $<) \
+ && $(THRIFT) --gen py:enum -out gen-py-enum ../v0.16/$(notdir $<) \
+ || $(THRIFT) --gen py:enum -out gen-py-enum $<
clean-local:
$(RM) -r build
diff --git a/test/py/generate.cmake b/test/py/generate.cmake
index e6a6735e4..eb6f11106 100644
--- a/test/py/generate.cmake
+++ b/test/py/generate.cmake
@@ -7,21 +7,21 @@ macro(GENERATE FILENAME GENERATOR OUTPUTDIR)
endif()
endmacro(GENERATE)
-generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py gen-py-default)
-generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:slots gen-py-slots)
-generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:old_style gen-py-oldstyle)
-generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:no_utf8strings gen-py-no_utf8strings)
-generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:dynamic gen-py-dynamic)
-generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:dynamic,slots gen-py-dynamicslots)
-generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:enum gen-py-enum)
+generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py gen-py-default)
+generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:slots gen-py-slots)
+generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:old_style gen-py-oldstyle)
+generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:no_utf8strings gen-py-no_utf8strings)
+generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:dynamic gen-py-dynamic)
+generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:dynamic,slots gen-py-dynamicslots)
+generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:enum gen-py-enum)
-generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py gen-py-default)
-generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:slots gen-py-slots)
-generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:old_style gen-py-oldstyle)
-generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:no_utf8strings gen-py-no_utf8strings)
-generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:dynamic gen-py-dynamic)
-generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:dynamic,slots gen-py-dynamicslots)
-generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:enum gen-py-enum)
+generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py gen-py-default)
+generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:slots gen-py-slots)
+generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:old_style gen-py-oldstyle)
+generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:no_utf8strings gen-py-no_utf8strings)
+generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:dynamic gen-py-dynamic)
+generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:dynamic,slots gen-py-dynamicslots)
+generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:enum gen-py-enum)
generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py gen-py-default)
generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:slots gen-py-slots)
diff --git a/test/rb/Makefile.am b/test/rb/Makefile.am
index 39109340d..5dd755946 100644
--- a/test/rb/Makefile.am
+++ b/test/rb/Makefile.am
@@ -17,8 +17,8 @@
# under the License.
#
-stubs: $(THRIFT) ../ThriftTest.thrift ../SmallTest.thrift
- $(THRIFT) --gen rb ../ThriftTest.thrift
+stubs: $(THRIFT) ../v0.16/ThriftTest.thrift ../SmallTest.thrift
+ $(THRIFT) --gen rb ../v0.16/ThriftTest.thrift
$(THRIFT) --gen rb ../SmallTest.thrift
$(THRIFT) --gen rb ../Recursive.thrift
diff --git a/test/rs/Makefile.am b/test/rs/Makefile.am
index 78db5ee0c..103f80c9a 100644
--- a/test/rs/Makefile.am
+++ b/test/rs/Makefile.am
@@ -17,8 +17,8 @@
# under the License.
#
-stubs: ../ThriftTest.thrift
- $(THRIFT) -I ./thrifts -out src --gen rs ../ThriftTest.thrift
+stubs: ../v0.16/ThriftTest.thrift
+ $(THRIFT) -I ./thrifts -out src --gen rs ../v0.16/ThriftTest.thrift
precross: stubs
$(CARGO) build
diff --git a/test/v0.16/ConstantsDemo.thrift b/test/v0.16/ConstantsDemo.thrift
new file mode 100644
index 000000000..204e805b1
--- /dev/null
+++ b/test/v0.16/ConstantsDemo.thrift
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+namespace cpp yozone
+namespace erl consts_
+namespace haxe constantsDemo
+
+struct thing {
+ 1: i32 hello,
+ 2: i32 goodbye
+}
+
+enum enumconstants {
+ ONE = 1,
+ TWO = 2
+}
+
+// struct thing2 {
+// /** standard docstring */
+// 1: enumconstants val = TWO
+// }
+
+typedef i32 myIntType
+const myIntType myInt = 3
+
+//const map<enumconstants,string> GEN_ENUM_NAMES = {ONE : "HOWDY", TWO: "PARTNER"}
+
+const i32 hex_const = 0x0001F
+const i32 negative_hex_constant = -0x0001F
+
+const i32 GEN_ME = -3523553
+const double GEn_DUB = 325.532
+const double GEn_DU = 085.2355
+const string GEN_STRING = "asldkjasfd"
+
+const double e10 = 1e10 // fails with 0.9.3 and earlier
+const double e11 = -1e10
+
+const map<i32,i32> GEN_MAP = { 35532 : 233, 43523 : 853 }
+const list<i32> GEN_LIST = [ 235235, 23598352, 3253523 ]
+
+const map<i32, map<i32, i32>> GEN_MAPMAP = { 235 : { 532 : 53255, 235:235}}
+
+const map<string,i32> GEN_MAP2 = { "hello" : 233, "lkj98d" : 853, 'lkjsdf' : 098325 }
+
+const thing GEN_THING = { 'hello' : 325, 'goodbye' : 325352 }
+
+const map<i32,thing> GEN_WHAT = { 35 : { 'hello' : 325, 'goodbye' : 325352 } }
+
+const set<i32> GEN_SET = [ 235, 235, 53235 ]
+
+exception Blah {
+ 1: i32 bing }
+
+exception Gak {}
+
+service yowza {
+ void blingity(),
+ i32 blangity() throws (1: Blah hoot )
+}
diff --git a/test/v0.16/DebugProtoTest.thrift b/test/v0.16/DebugProtoTest.thrift
new file mode 100644
index 000000000..5d0face4b
--- /dev/null
+++ b/test/v0.16/DebugProtoTest.thrift
@@ -0,0 +1,393 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+namespace c_glib TTest
+namespace cpp thrift.test.debug
+namespace java thrift.test
+namespace rb thrift.test
+
+struct Doubles {
+ 1: double nan,
+ 2: double inf,
+ 3: double neginf,
+ 4: double repeating,
+ 5: double big,
+ 6: double tiny,
+ 7: double zero,
+ 8: double negzero,
+}
+
+struct OneOfEach {
+ 1: bool im_true,
+ 2: bool im_false,
+ 3: i8 a_bite = 0x7f,
+ 4: i16 integer16 = 0x7fff,
+ 5: i32 integer32,
+ 6: i64 integer64 = 10000000000,
+ 7: double double_precision,
+ 8: string some_characters,
+ 9: string zomg_unicode,
+ 10: bool what_who,
+ 11: binary base64,
+ 12: list<i8> byte_list = [1, 2, 3],
+ 13: list<i16> i16_list = [1,2,3],
+ 14: list<i64> i64_list = [1,2,3]
+}
+
+struct Bonk {
+ 1: i32 type,
+ 2: string message,
+}
+
+struct Nesting {
+ 1: Bonk my_bonk,
+ 2: OneOfEach my_ooe,
+}
+
+struct HolyMoley {
+ 1: list<OneOfEach> big,
+ 2: set<list<string> (python.immutable = "")> contain,
+ 3: map<string,list<Bonk>> bonks,
+}
+
+struct Backwards {
+ 2: i32 first_tag2,
+ 1: i32 second_tag1,
+}
+
+struct Empty {
+} (
+ python.immutable = "",
+)
+
+struct Wrapper {
+ 1: Empty foo
+} (
+ python.immutable = "",
+)
+
+struct RandomStuff {
+ 1: i32 a,
+ 2: i32 b,
+ 3: i32 c,
+ 4: i32 d,
+ 5: list<i32> myintlist,
+ 6: map<i32,Wrapper> maps,
+ 7: i64 bigint,
+ 8: double triple,
+}
+
+struct Base64 {
+ 1: i32 a,
+ 2: binary b1,
+ 3: binary b2,
+ 4: binary b3,
+ 5: binary b4,
+ 6: binary b5,
+ 7: binary b6,
+}
+
+struct CompactProtoTestStruct {
+ // primitive fields
+ 1: i8 a_byte;
+ 2: i16 a_i16;
+ 3: i32 a_i32;
+ 4: i64 a_i64;
+ 5: double a_double;
+ 6: string a_string;
+ 7: binary a_binary;
+ 8: bool true_field;
+ 9: bool false_field;
+ 10: Empty empty_struct_field;
+
+ // primitives in lists
+ 11: list<i8> byte_list;
+ 12: list<i16> i16_list;
+ 13: list<i32> i32_list;
+ 14: list<i64> i64_list;
+ 15: list<double> double_list;
+ 16: list<string> string_list;
+ 17: list<binary> binary_list;
+ 18: list<bool> boolean_list;
+ 19: list<Empty> struct_list;
+
+ // primitives in sets
+ 20: set<i8> byte_set;
+ 21: set<i16> i16_set;
+ 22: set<i32> i32_set;
+ 23: set<i64> i64_set;
+ 24: set<double> double_set;
+ 25: set<string> string_set;
+ 26: set<binary> binary_set;
+ 27: set<bool> boolean_set;
+ 28: set<Empty> struct_set;
+
+ // maps
+ // primitives as keys
+ 29: map<i8, i8> byte_byte_map;
+ 30: map<i16, i8> i16_byte_map;
+ 31: map<i32, i8> i32_byte_map;
+ 32: map<i64, i8> i64_byte_map;
+ 33: map<double, i8> double_byte_map;
+ 34: map<string, i8> string_byte_map;
+ 35: map<binary, i8> binary_byte_map;
+ 36: map<bool, i8> boolean_byte_map;
+ // primitives as values
+ 37: map<i8, i16> byte_i16_map;
+ 38: map<i8, i32> byte_i32_map;
+ 39: map<i8, i64> byte_i64_map;
+ 40: map<i8, double> byte_double_map;
+ 41: map<i8, string> byte_string_map;
+ 42: map<i8, binary> byte_binary_map;
+ 43: map<i8, bool> byte_boolean_map;
+ // collections as keys
+ 44: map<list<i8> (python.immutable = ""), i8> list_byte_map;
+ 45: map<set<i8> (python.immutable = ""), i8> set_byte_map;
+ 46: map<map<i8,i8> (python.immutable = ""), i8> map_byte_map;
+ // collections as values
+ 47: map<i8, map<i8,i8>> byte_map_map;
+ 48: map<i8, set<i8>> byte_set_map;
+ 49: map<i8, list<i8>> byte_list_map;
+
+ // large field IDs
+ 500 : i64 field500;
+ 5000 : i64 field5000;
+ 20000 : i64 field20000;
+}
+
+// To be used to test the serialization of an empty map
+struct SingleMapTestStruct {
+ 1: required map<i32, i32> i32_map;
+}
+
+const CompactProtoTestStruct COMPACT_TEST = {
+ 'a_byte' : 127,
+ 'a_i16' : 32000,
+ 'a_i32' : 1000000000,
+ 'a_i64' : 0xffffffffff,
+ 'a_double' : 5.6789,
+ 'a_string' : "my string",
+//'a_binary,'
+ 'true_field' : 1,
+ 'false_field' : 0,
+ 'empty_struct_field' : {},
+ 'byte_list' : [-127, -1, 0, 1, 127],
+ 'i16_list' : [-1, 0, 1, 0x7fff],
+ 'i32_list' : [-1, 0, 0xff, 0xffff, 0xffffff, 0x7fffffff],
+ 'i64_list' : [-1, 0, 0xff, 0xffff, 0xffffff, 0xffffffff, 0xffffffffff, 0xffffffffffff, 0xffffffffffffff, 0x7fffffffffffffff],
+ 'double_list' : [0.1, 0.2, 0.3],
+ 'string_list' : ["first", "second", "third"],
+//'binary_list,'
+ 'boolean_list' : [1, 1, 1, 0, 0, 0],
+ 'struct_list' : [{}, {}],
+ 'byte_set' : [-127, -1, 0, 1, 127],
+ 'i16_set' : [-1, 0, 1, 0x7fff],
+ 'i32_set' : [1, 2, 3],
+ 'i64_set' : [-1, 0, 0xff, 0xffff, 0xffffff, 0xffffffff, 0xffffffffff, 0xffffffffffff, 0xffffffffffffff, 0x7fffffffffffffff],
+ 'double_set' : [0.1, 0.2, 0.3],
+ 'string_set' : ["first", "second", "third"],
+//'binary_set,'
+ 'boolean_set' : [1, 0],
+ 'struct_set' : [{}],
+ 'byte_byte_map' : {1 : 2},
+ 'i16_byte_map' : {1 : 1, -1 : 1, 0x7fff : 1},
+ 'i32_byte_map' : {1 : 1, -1 : 1, 0x7fffffff : 1},
+ 'i64_byte_map' : {0 : 1, 1 : 1, -1 : 1, 0x7fffffffffffffff : 1},
+ 'double_byte_map' : {-1.1 : 1, 1.1 : 1},
+ 'string_byte_map' : {"first" : 1, "second" : 2, "third" : 3, "" : 0},
+//'binary_byte_map,'
+ 'boolean_byte_map' : {1 : 1, 0 : 0},
+ 'byte_i16_map' : {1 : 1, 2 : -1, 3 : 0x7fff},
+ 'byte_i32_map' : {1 : 1, 2 : -1, 3 : 0x7fffffff},
+ 'byte_i64_map' : {1 : 1, 2 : -1, 3 : 0x7fffffffffffffff},
+ 'byte_double_map' : {1 : 0.1, 2 : -0.1, 3 : 1000000.1},
+ 'byte_string_map' : {1 : "", 2 : "blah", 3 : "loooooooooooooong string"},
+//'byte_binary_map,'
+ 'byte_boolean_map' : {1 : 1, 2 : 0},
+ 'list_byte_map' : {[1, 2, 3] : 1, [0, 1] : 2, [] : 0},
+ 'set_byte_map' : {[1, 2, 3] : 1, [0, 1] : 2, [] : 0},
+ 'map_byte_map' : {{1 : 1} : 1, {2 : 2} : 2, {} : 0},
+ 'byte_map_map' : {0 : {}, 1 : {1 : 1}, 2 : {1 : 1, 2 : 2}},
+ 'byte_set_map' : {0 : [], 1 : [1], 2 : [1, 2]},
+ 'byte_list_map' : {0 : [], 1 : [1], 2 : [1, 2]},
+
+ 'field500' : 500,
+ 'field5000' : 5000,
+ 'field20000' : 20000,
+}
+
+
+const i32 MYCONST = 2
+
+
+exception ExceptionWithAMap {
+ 1: string blah;
+ 2: map<string, string> map_field;
+}
+
+exception MutableException {
+ 1: string msg;
+} (python.immutable = "false")
+
+exception ExceptionWithoutFields {}
+
+service ServiceForExceptionWithAMap {
+ void methodThatThrowsAnException() throws (1: ExceptionWithAMap xwamap);
+}
+
+service Srv {
+ i32 Janky(1: i32 arg);
+
+ // return type only methods
+
+ void voidMethod();
+ i32 primitiveMethod();
+ CompactProtoTestStruct structMethod();
+
+ void methodWithDefaultArgs(1: i32 something = MYCONST);
+
+ oneway void onewayMethod();
+
+ bool declaredExceptionMethod(1: bool shouldThrow) throws (1: ExceptionWithAMap xwamap);
+}
+
+service Inherited extends Srv {
+ i32 identity(1: i32 arg)
+}
+
+service EmptyService {}
+
+// The only purpose of this thing is to increase the size of the generated code
+// so that ZlibTest has more highly compressible data to play with.
+struct BlowUp {
+ 1: map<list<i32>(python.immutable = ""),set<map<i32,string> (python.immutable = "")>> b1;
+ 2: map<list<i32>(python.immutable = ""),set<map<i32,string> (python.immutable = "")>> b2;
+ 3: map<list<i32>(python.immutable = ""),set<map<i32,string> (python.immutable = "")>> b3;
+ 4: map<list<i32>(python.immutable = ""),set<map<i32,string> (python.immutable = "")>> b4;
+}
+
+
+struct ReverseOrderStruct {
+ 4: string first;
+ 3: i16 second;
+ 2: i32 third;
+ 1: i64 fourth;
+}
+
+service ReverseOrderService {
+ void myMethod(4: string first, 3: i16 second, 2: i32 third, 1: i64 fourth);
+}
+
+enum SomeEnum {
+ ONE = 1
+ TWO = 2
+}
+
+/** This is a docstring on a constant! */
+const SomeEnum MY_SOME_ENUM = SomeEnum.ONE
+
+const SomeEnum MY_SOME_ENUM_1 = 1
+/*const SomeEnum MY_SOME_ENUM_2 = 7*/
+
+const map<SomeEnum,SomeEnum> MY_ENUM_MAP = {
+ SomeEnum.ONE : SomeEnum.TWO
+}
+
+struct StructWithSomeEnum {
+ 1: SomeEnum blah;
+}
+
+const map<SomeEnum,StructWithSomeEnum> EXTRA_CRAZY_MAP = {
+ SomeEnum.ONE : {"blah" : SomeEnum.TWO}
+}
+
+union TestUnion {
+ /**
+ * A doc string
+ */
+ 1: string string_field;
+ 2: i32 i32_field;
+ 3: OneOfEach struct_field;
+ 4: list<RandomStuff> struct_list;
+ 5: i32 other_i32_field;
+ 6: SomeEnum enum_field;
+ 7: set<i32> i32_set;
+ 8: map<i32, i32> i32_map;
+}
+
+union TestUnionMinusStringField {
+ 2: i32 i32_field;
+ 3: OneOfEach struct_field;
+ 4: list<RandomStuff> struct_list;
+ 5: i32 other_i32_field;
+ 6: SomeEnum enum_field;
+ 7: set<i32> i32_set;
+ 8: map<i32, i32> i32_map;
+}
+
+union ComparableUnion {
+ 1: string string_field;
+ 2: binary binary_field;
+}
+
+struct StructWithAUnion {
+ 1: TestUnion test_union;
+}
+
+struct PrimitiveThenStruct {
+ 1: i32 blah;
+ 2: i32 blah2;
+ 3: Backwards bw;
+}
+
+typedef map<i32,i32> SomeMap
+
+struct StructWithASomemap {
+ 1: required SomeMap somemap_field;
+}
+
+struct BigFieldIdStruct {
+ 1: string field1;
+ 45: string field2;
+}
+
+struct BreaksRubyCompactProtocol {
+ 1: string field1;
+ 2: BigFieldIdStruct field2;
+ 3: i32 field3;
+}
+
+struct TupleProtocolTestStruct {
+ optional i32 field1;
+ optional i32 field2;
+ optional i32 field3;
+ optional i32 field4;
+ optional i32 field5;
+ optional i32 field6;
+ optional i32 field7;
+ optional i32 field8;
+ optional i32 field9;
+ optional i32 field10;
+ optional i32 field11;
+ optional i32 field12;
+}
+
+struct ListDoublePerf {
+ 1: list<double> field;
+}
diff --git a/test/v0.16/ThriftTest.thrift b/test/v0.16/ThriftTest.thrift
new file mode 100644
index 000000000..4a1045fcd
--- /dev/null
+++ b/test/v0.16/ThriftTest.thrift
@@ -0,0 +1,418 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ * Contains some contributions under the Thrift Software License.
+ * Please see doc/old-thrift-license.txt in the Thrift distribution for
+ * details.
+ */
+
+namespace c_glib TTest
+namespace cpp thrift.test
+namespace delphi Thrift.Test
+namespace go thrifttest
+namespace java thrift.test
+namespace js ThriftTest
+namespace lua ThriftTest
+namespace netstd ThriftTest
+namespace perl ThriftTest
+namespace php ThriftTest
+namespace py ThriftTest
+namespace py.twisted ThriftTest
+namespace rb Thrift.Test
+namespace st ThriftTest
+namespace xsd test (uri = 'http://thrift.apache.org/ns/ThriftTest')
+
+// Presence of namespaces and sub-namespaces for which there is
+// no generator should compile with warnings only
+namespace noexist ThriftTest
+namespace cpp.noexist ThriftTest
+
+namespace * thrift.test
+
+/**
+ * Docstring!
+ */
+enum Numberz
+{
+ ONE = 1,
+ TWO,
+ THREE,
+ FIVE = 5,
+ SIX,
+ EIGHT = 8
+}
+
+const Numberz myNumberz = Numberz.ONE;
+// the following is expected to fail:
+// const Numberz urNumberz = ONE;
+
+typedef i64 UserId
+
+struct Bonk
+{
+ 1: string message,
+ 2: i32 type
+}
+
+typedef map<string,Bonk> MapType
+
+struct Bools {
+ 1: bool im_true,
+ 2: bool im_false,
+}
+
+struct Xtruct
+{
+ 1: string string_thing,
+ 4: i8 byte_thing,
+ 9: i32 i32_thing,
+ 11: i64 i64_thing
+}
+
+struct Xtruct2
+{
+ 1: i8 byte_thing, // used to be byte, hence the name
+ 2: Xtruct struct_thing,
+ 3: i32 i32_thing
+}
+
+struct Xtruct3
+{
+ 1: string string_thing,
+ 4: i32 changed,
+ 9: i32 i32_thing,
+ 11: i64 i64_thing
+}
+
+
+struct Insanity
+{
+ 1: map<Numberz, UserId> userMap,
+ 2: list<Xtruct> xtructs
+} (python.immutable= "")
+
+struct CrazyNesting {
+ 1: string string_field,
+ 2: optional set<Insanity> set_field,
+ // Do not insert line break as test/go/Makefile.am is removing this line with pattern match
+ 3: required list<map<set<i32> (python.immutable = ""), map<i32,set<list<map<Insanity,string>(python.immutable = "")> (python.immutable = "")>>>> list_field,
+ 4: binary binary_field
+}
+
+union SomeUnion {
+ 1: map<Numberz, UserId> map_thing,
+ 2: string string_thing,
+ 3: i32 i32_thing,
+ 4: Xtruct3 xtruct_thing,
+ 5: Insanity insanity_thing
+}
+
+exception Xception {
+ 1: i32 errorCode,
+ 2: string message
+}
+
+exception Xception2 {
+ 1: i32 errorCode,
+ 2: Xtruct struct_thing
+}
+
+struct EmptyStruct {}
+
+struct OneField {
+ 1: EmptyStruct field
+}
+
+service ThriftTest
+{
+ /**
+ * Prints "testVoid()" and returns nothing.
+ */
+ void testVoid(),
+
+ /**
+ * Prints 'testString("%s")' with thing as '%s'
+ * @param string thing - the string to print
+ * @return string - returns the string 'thing'
+ */
+ string testString(1: string thing),
+
+ /**
+ * Prints 'testBool("%s")' where '%s' with thing as 'true' or 'false'
+ * @param bool thing - the bool data to print
+ * @return bool - returns the bool 'thing'
+ */
+ bool testBool(1: bool thing),
+
+ /**
+ * Prints 'testByte("%d")' with thing as '%d'
+ * The types i8 and byte are synonyms, use of i8 is encouraged, byte still exists for the sake of compatibility.
+ * @param byte thing - the i8/byte to print
+ * @return i8 - returns the i8/byte 'thing'
+ */
+ i8 testByte(1: i8 thing),
+
+ /**
+ * Prints 'testI32("%d")' with thing as '%d'
+ * @param i32 thing - the i32 to print
+ * @return i32 - returns the i32 'thing'
+ */
+ i32 testI32(1: i32 thing),
+
+ /**
+ * Prints 'testI64("%d")' with thing as '%d'
+ * @param i64 thing - the i64 to print
+ * @return i64 - returns the i64 'thing'
+ */
+ i64 testI64(1: i64 thing),
+
+ /**
+ * Prints 'testDouble("%f")' with thing as '%f'
+ * @param double thing - the double to print
+ * @return double - returns the double 'thing'
+ */
+ double testDouble(1: double thing),
+
+ /**
+ * Prints 'testBinary("%s")' where '%s' is a hex-formatted string of thing's data
+ * @param binary thing - the binary data to print
+ * @return binary - returns the binary 'thing'
+ */
+ binary testBinary(1: binary thing),
+
+ /**
+ * Prints 'testStruct("{%s}")' where thing has been formatted into a string of comma separated values
+ * @param Xtruct thing - the Xtruct to print
+ * @return Xtruct - returns the Xtruct 'thing'
+ */
+ Xtruct testStruct(1: Xtruct thing),
+
+ /**
+ * Prints 'testNest("{%s}")' where thing has been formatted into a string of the nested struct
+ * @param Xtruct2 thing - the Xtruct2 to print
+ * @return Xtruct2 - returns the Xtruct2 'thing'
+ */
+ Xtruct2 testNest(1: Xtruct2 thing),
+
+ /**
+ * Prints 'testMap("{%s")' where thing has been formatted into a string of 'key => value' pairs
+ * separated by commas and new lines
+ * @param map<i32,i32> thing - the map<i32,i32> to print
+ * @return map<i32,i32> - returns the map<i32,i32> 'thing'
+ */
+ map<i32,i32> testMap(1: map<i32,i32> thing),
+
+ /**
+ * Prints 'testStringMap("{%s}")' where thing has been formatted into a string of 'key => value' pairs
+ * separated by commas and new lines
+ * @param map<string,string> thing - the map<string,string> to print
+ * @return map<string,string> - returns the map<string,string> 'thing'
+ */
+ map<string,string> testStringMap(1: map<string,string> thing),
+
+ /**
+ * Prints 'testSet("{%s}")' where thing has been formatted into a string of values
+ * separated by commas and new lines
+ * @param set<i32> thing - the set<i32> to print
+ * @return set<i32> - returns the set<i32> 'thing'
+ */
+ set<i32> testSet(1: set<i32> thing),
+
+ /**
+ * Prints 'testList("{%s}")' where thing has been formatted into a string of values
+ * separated by commas and new lines
+ * @param list<i32> thing - the list<i32> to print
+ * @return list<i32> - returns the list<i32> 'thing'
+ */
+ list<i32> testList(1: list<i32> thing),
+
+ /**
+ * Prints 'testEnum("%d")' where thing has been formatted into its numeric value
+ * @param Numberz thing - the Numberz to print
+ * @return Numberz - returns the Numberz 'thing'
+ */
+ Numberz testEnum(1: Numberz thing),
+
+ /**
+ * Prints 'testTypedef("%d")' with thing as '%d'
+ * @param UserId thing - the UserId to print
+ * @return UserId - returns the UserId 'thing'
+ */
+ UserId testTypedef(1: UserId thing),
+
+ /**
+ * Prints 'testMapMap("%d")' with hello as '%d'
+ * @param i32 hello - the i32 to print
+ * @return map<i32,map<i32,i32>> - returns a dictionary with these values:
+ * {-4 => {-4 => -4, -3 => -3, -2 => -2, -1 => -1, }, 4 => {1 => 1, 2 => 2, 3 => 3, 4 => 4, }, }
+ */
+ map<i32,map<i32,i32>> testMapMap(1: i32 hello),
+
+ /**
+ * So you think you've got this all worked out, eh?
+ *
+ * Creates a map with these values and prints it out:
+ * { 1 => { 2 => argument,
+ * 3 => argument,
+ * },
+ * 2 => { 6 => <empty Insanity struct>, },
+ * }
+ * @return map<UserId, map<Numberz,Insanity>> - a map with the above values
+ */
+ map<UserId, map<Numberz,Insanity>> testInsanity(1: Insanity argument),
+
+ /**
+ * Prints 'testMulti()'
+ * @param i8 arg0 -
+ * @param i32 arg1 -
+ * @param i64 arg2 -
+ * @param map<i16, string> arg3 -
+ * @param Numberz arg4 -
+ * @param UserId arg5 -
+ * @return Xtruct - returns an Xtruct with string_thing = "Hello2, byte_thing = arg0, i32_thing = arg1
+ * and i64_thing = arg2
+ */
+ Xtruct testMulti(1: i8 arg0, 2: i32 arg1, 3: i64 arg2, 4: map<i16, string> arg3, 5: Numberz arg4, 6: UserId arg5),
+
+ /**
+ * Print 'testException(%s)' with arg as '%s'
+ * @param string arg - a string indication what type of exception to throw
+ * if arg == "Xception" throw Xception with errorCode = 1001 and message = arg
+ * else if arg == "TException" throw TException
+ * else do not throw anything
+ */
+ void testException(1: string arg) throws(1: Xception err1),
+
+ /**
+ * Print 'testMultiException(%s, %s)' with arg0 as '%s' and arg1 as '%s'
+ * @param string arg - a string indicating what type of exception to throw
+ * if arg0 == "Xception" throw Xception with errorCode = 1001 and message = "This is an Xception"
+ * else if arg0 == "Xception2" throw Xception2 with errorCode = 2002 and struct_thing.string_thing = "This is an Xception2"
+ * else do not throw anything
+ * @return Xtruct - an Xtruct with string_thing = arg1
+ */
+ Xtruct testMultiException(1: string arg0, 2: string arg1) throws(1: Xception err1, 2: Xception2 err2)
+
+ /**
+ * Print 'testOneway(%d): Sleeping...' with secondsToSleep as '%d'
+ * sleep 'secondsToSleep'
+ * Print 'testOneway(%d): done sleeping!' with secondsToSleep as '%d'
+ * @param i32 secondsToSleep - the number of seconds to sleep
+ */
+ oneway void testOneway(1:i32 secondsToSleep)
+}
+
+service SecondService
+{
+ /**
+ * Prints 'testString("%s")' with thing as '%s'
+ * @param string thing - the string to print
+ * @return string - returns the string 'thing'
+ */
+ string secondtestString(1: string thing)
+}
+
+struct VersioningTestV1 {
+ 1: i32 begin_in_both,
+ 3: string old_string,
+ 12: i32 end_in_both
+}
+
+struct VersioningTestV2 {
+ 1: i32 begin_in_both,
+
+ 2: i32 newint,
+ 3: i8 newbyte,
+ 4: i16 newshort,
+ 5: i64 newlong,
+ 6: double newdouble
+ 7: Bonk newstruct,
+ 8: list<i32> newlist,
+ 9: set<i32> newset,
+ 10: map<i32, i32> newmap,
+ 11: string newstring,
+ 12: i32 end_in_both
+}
+
+struct ListTypeVersioningV1 {
+ 1: list<i32> myints;
+ 2: string hello;
+}
+
+struct ListTypeVersioningV2 {
+ 1: list<string> strings;
+ 2: string hello;
+}
+
+struct GuessProtocolStruct {
+ 7: map<string,string> map_field,
+}
+
+struct LargeDeltas {
+ 1: Bools b1,
+ 10: Bools b10,
+ 100: Bools b100,
+ 500: bool check_true,
+ 1000: Bools b1000,
+ 1500: bool check_false,
+ 2000: VersioningTestV2 vertwo2000,
+ 2500: set<string> a_set2500,
+ 3000: VersioningTestV2 vertwo3000,
+ 4000: list<i32> big_numbers
+}
+
+struct NestedListsI32x2 {
+ 1: list<list<i32>> integerlist
+}
+struct NestedListsI32x3 {
+ 1: list<list<list<i32>>> integerlist
+}
+struct NestedMixedx2 {
+ 1: list<set<i32>> int_set_list
+ 2: map<i32,set<string>> map_int_strset
+ 3: list<map<i32,set<string>>> map_int_strset_list
+}
+struct ListBonks {
+ 1: list<Bonk> bonk
+}
+struct NestedListsBonk {
+ 1: list<list<list<Bonk>>> bonk
+}
+
+struct BoolTest {
+ 1: optional bool b = true;
+ 2: optional string s = "true";
+}
+
+struct StructA {
+ 1: required string s;
+}
+
+struct StructB {
+ 1: optional StructA aa;
+ 2: required StructA ab;
+}
+
+struct OptionalSetDefaultTest {
+ 1: optional set<string> with_default = [ "test" ]
+}
+
+struct OptionalBinary {
+ 1: optional set<binary> bin_set = {}
+ 2: optional map<binary,i32> bin_map = {}
+}