From 1b4c9b9691b856283f13f6ffb5979acc0d2c1738 Mon Sep 17 00:00:00 2001 From: Jens Geyer Date: Fri, 26 Apr 2013 23:38:58 +0200 Subject: [PATCH] THRIFT-1945: C#: sbyte breaks TestClient Patch: Carl Yeksigian --- test/csharp/ThriftTest/TestClient.cs | 10 +++++----- test/csharp/ThriftTest/TestServer.cs | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/csharp/ThriftTest/TestClient.cs b/test/csharp/ThriftTest/TestClient.cs index 60fc995e..fe21f41c 100644 --- a/test/csharp/ThriftTest/TestClient.cs +++ b/test/csharp/ThriftTest/TestClient.cs @@ -163,7 +163,7 @@ namespace Test Console.WriteLine(" = \"" + s + "\""); Console.Write("testByte(1)"); - byte i8 = client.testByte((byte)1); + sbyte i8 = client.testByte((sbyte)1); Console.WriteLine(" = " + i8); Console.Write("testI32(-1)"); @@ -181,7 +181,7 @@ namespace Test Console.Write("testStruct({\"Zero\", 1, -3, -5})"); Xtruct o = new Xtruct(); o.String_thing = "Zero"; - o.Byte_thing = (byte)1; + o.Byte_thing = (sbyte)1; o.I32_thing = -3; o.I64_thing = -5; Xtruct i = client.testStruct(o); @@ -189,7 +189,7 @@ namespace Test Console.Write("testNest({1, {\"Zero\", 1, -3, -5}, 5})"); Xtruct2 o2 = new Xtruct2(); - o2.Byte_thing = (byte)1; + o2.Byte_thing = (sbyte)1; o2.Struct_thing = o; o2.I32_thing = 5; Xtruct2 i2 = client.testNest(o2); @@ -359,7 +359,7 @@ namespace Test insane.UserMap[Numberz.FIVE] = 5000L; Xtruct truck = new Xtruct(); truck.String_thing = "Truck"; - truck.Byte_thing = (byte)8; + truck.Byte_thing = (sbyte)8; truck.I32_thing = 8; truck.I64_thing = 8; insane.Xtructs = new List(); @@ -416,7 +416,7 @@ namespace Test Console.WriteLine("}"); - byte arg0 = 1; + sbyte arg0 = 1; int arg1 = 2; long arg2 = long.MaxValue; Dictionary multiDict = new Dictionary(); diff --git a/test/csharp/ThriftTest/TestServer.cs b/test/csharp/ThriftTest/TestServer.cs index 6fb75f44..ceb4368b 100644 --- a/test/csharp/ThriftTest/TestServer.cs +++ b/test/csharp/ThriftTest/TestServer.cs @@ -50,7 +50,7 @@ namespace Test return thing; } - public byte testByte(byte thing) + public sbyte testByte(sbyte thing) { Console.WriteLine("testByte(" + thing + ")"); return thing; @@ -221,7 +221,7 @@ namespace Test Xtruct goodbye = new Xtruct(); goodbye.String_thing = "Goodbye4"; - goodbye.Byte_thing = (byte)4; + goodbye.Byte_thing = (sbyte)4; goodbye.I32_thing = 4; goodbye.I64_thing = (long)4; @@ -251,7 +251,7 @@ namespace Test return insane; } - public Xtruct testMulti(byte arg0, int arg1, long arg2, Dictionary arg3, Numberz arg4, long arg5) + public Xtruct testMulti(sbyte arg0, int arg1, long arg2, Dictionary arg3, Numberz arg4, long arg5) { Console.WriteLine("testMulti()"); -- 2.17.1