THRIFT-1945: C#: sbyte breaks TestClient
authorJens Geyer <jensg@apache.org>
Fri, 26 Apr 2013 21:38:58 +0000 (23:38 +0200)
committerJens Geyer <jensg@apache.org>
Fri, 26 Apr 2013 21:38:58 +0000 (23:38 +0200)
Patch: Carl Yeksigian

test/csharp/ThriftTest/TestClient.cs
test/csharp/ThriftTest/TestServer.cs

index 60fc995..fe21f41 100644 (file)
@@ -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<Xtruct>();
@@ -416,7 +416,7 @@ namespace Test
                        Console.WriteLine("}");
 
 
-                       byte arg0 = 1;
+                       sbyte arg0 = 1;
                        int arg1 = 2;
                        long arg2 = long.MaxValue;
                        Dictionary<short, string> multiDict = new Dictionary<short, string>();
index 6fb75f4..ceb4368 100644 (file)
@@ -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<short, string> arg3, Numberz arg4, long arg5)
+                       public Xtruct testMulti(sbyte arg0, int arg1, long arg2, Dictionary<short, string> arg3, Numberz arg4, long arg5)
                        {
                                Console.WriteLine("testMulti()");