diff options
author | Kino Roy <kinoroy@users.noreply.github.com> | 2022-10-07 23:13:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 14:13:01 +0800 |
commit | a9da9eb05993a235df999226303bc594e4778805 (patch) | |
tree | 173200fc08231818b9bdea1943fda0be11cd560f /lib/kotlin | |
parent | ed542c63fc4360ef6d397df3cd92d6623d713e1e (diff) | |
download | thrift-a9da9eb05993a235df999226303bc594e4778805.tar.gz |
THRIFT-4547: Swift crosstests (#2670)
Co-authored-by: Jiayu Liu <Jimexist@users.noreply.github.com>
Diffstat (limited to 'lib/kotlin')
-rw-r--r-- | lib/kotlin/cross-test-server/src/main/kotlin/org/apache/thrift/test/TestHandler.kt | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/kotlin/cross-test-server/src/main/kotlin/org/apache/thrift/test/TestHandler.kt b/lib/kotlin/cross-test-server/src/main/kotlin/org/apache/thrift/test/TestHandler.kt index ab415b00b..b7f38d7fe 100644 --- a/lib/kotlin/cross-test-server/src/main/kotlin/org/apache/thrift/test/TestHandler.kt +++ b/lib/kotlin/cross-test-server/src/main/kotlin/org/apache/thrift/test/TestHandler.kt @@ -183,7 +183,11 @@ class TestHandler : ThriftTest { val secondMap = mutableMapOf<Numberz, Insanity>() firstMap[Numberz.TWO] = argument firstMap[Numberz.THREE] = argument - val looney = Insanity() + val looney = + Insanity().apply { + userMap = HashMap() + xtructs = listOf() + } secondMap[Numberz.SIX] = looney val insane: MutableMap<Long, Map<Numberz, Insanity>> = HashMap() insane[1L] = firstMap @@ -241,11 +245,20 @@ class TestHandler : ThriftTest { } else if (arg0 == "Xception2") { val x = Xception2() x.errorCode = 2002 - x.struct_thing = Xtruct().apply { string_thing = "This is an Xception2" } + x.struct_thing = + Xtruct().apply { + string_thing = "This is an Xception2" + byte_thing = 0 + i32_thing = 0 + i64_thing = 0 + } throw x } val result = Xtruct() result.string_thing = arg1 + result.byte_thing = 0 + result.i32_thing = 0 + result.i64_thing = 0 return result } |