You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2017/01/02 09:46:27 UTC
thrift git commit: THRIFT-4016 testInsanity() impl does not conform
to test spec in ThriftTest.thrift Client: C# Patch: Allen George
Repository: thrift
Updated Branches:
refs/heads/master 540e346d6 -> d8bb0e3b9
THRIFT-4016 testInsanity() impl does not conform to test spec in ThriftTest.thrift
Client: C#
Patch: Allen George <al...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/d8bb0e3b
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/d8bb0e3b
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/d8bb0e3b
Branch: refs/heads/master
Commit: d8bb0e3b9ff7e6cecfc85c01a81280dc3d046430
Parents: 540e346
Author: Allen George <al...@gmail.com>
Authored: Mon Jan 2 10:43:37 2017 +0100
Committer: Jens Geyer <je...@apache.org>
Committed: Mon Jan 2 10:43:37 2017 +0100
----------------------------------------------------------------------
test/csharp/TestServer.cs | 35 ++++++++++-------------------------
1 file changed, 10 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/d8bb0e3b/test/csharp/TestServer.cs
----------------------------------------------------------------------
diff --git a/test/csharp/TestServer.cs b/test/csharp/TestServer.cs
index a9af715..7404ca2 100644
--- a/test/csharp/TestServer.cs
+++ b/test/csharp/TestServer.cs
@@ -273,39 +273,24 @@ namespace Test
return mapmap;
}
+ // Insanity
+ // returns:
+ // { 1 => { 2 => argument,
+ // 3 => argument,
+ // },
+ // 2 => { 6 => <empty Insanity struct>, },
+ // }
public Dictionary<long, Dictionary<Numberz, Insanity>> testInsanity(Insanity argument)
{
testLogDelegate.Invoke("testInsanity()");
- Xtruct hello = new Xtruct();
- hello.String_thing = "Hello2";
- hello.Byte_thing = 2;
- hello.I32_thing = 2;
- hello.I64_thing = 2;
-
- Xtruct goodbye = new Xtruct();
- goodbye.String_thing = "Goodbye4";
- goodbye.Byte_thing = (sbyte)4;
- goodbye.I32_thing = 4;
- goodbye.I64_thing = (long)4;
-
- Insanity crazy = new Insanity();
- crazy.UserMap = new Dictionary<Numberz, long>();
- crazy.UserMap[Numberz.EIGHT] = (long)8;
- crazy.Xtructs = new List<Xtruct>();
- crazy.Xtructs.Add(goodbye);
-
- Insanity looney = new Insanity();
- crazy.UserMap[Numberz.FIVE] = (long)5;
- crazy.Xtructs.Add(hello);
-
Dictionary<Numberz, Insanity> first_map = new Dictionary<Numberz, Insanity>();
Dictionary<Numberz, Insanity> second_map = new Dictionary<Numberz, Insanity>(); ;
- first_map[Numberz.TWO] = crazy;
- first_map[Numberz.THREE] = crazy;
+ first_map[Numberz.TWO] = argument;
+ first_map[Numberz.THREE] = argument;
- second_map[Numberz.SIX] = looney;
+ second_map[Numberz.SIX] = new Insanity();
Dictionary<long, Dictionary<Numberz, Insanity>> insane =
new Dictionary<long, Dictionary<Numberz, Insanity>>();