THRIFT-1973 TCompactProtocol in C# lib does not serialize and deserialize negative int32 and int64 number correctly
Patch: Eric Ding
diff --git a/lib/csharp/Makefile.am b/lib/csharp/Makefile.am
index 7bc161d..ee71bc9 100644
--- a/lib/csharp/Makefile.am
+++ b/lib/csharp/Makefile.am
@@ -61,7 +61,16 @@
src/TProcessor.cs \
src/TApplicationException.cs
+THRIFTTESTCODE = \
+ test/ThriftTest/Program.cs \
+ test/ThriftTest/TestClient.cs \
+ test/ThriftTest/TestServer.cs \
+ test/ThriftTest/RoundTripTest.cs \
+ test/ThriftTest/Thrift/Test/*.cs
+
CSC=gmcs
+NUNIT=nunit-console
+THRIFT=../../compiler/cpp/thrift
if NET_2_0
MONO_DEFINES=/d:NET_2_0
@@ -72,6 +81,15 @@
Thrift.dll: $(THRIFTCODE)
$(CSC) $(THRIFTCODE) /out:Thrift.dll /target:library /reference:System.Web $(MONO_DEFINES)
+test/ThriftTest/Thrift/Test/*.cs: ../../test/ThriftTest.thrift
+ $(THRIFT) -gen csharp:hashcode -out test/ThriftTest ../../test/ThriftTest.thrift
+
+ThriftTest.exe: Thrift.dll $(THRIFTTESTCODE)
+ $(CSC) $(THRIFTTESTCODE) /out:ThriftTest.exe /target:exe /reference:nunit.framework /reference:Thrift.dll $(MONO_DEFINES)
+
+check-local: ThriftTest.exe
+ $(NUNIT) ThriftTest.exe
+
clean-local:
$(RM) Thrift.dll