Fixed a few typos - test client and server samples now working with new code generation


	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664753 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift
index 64c045a..a8f5d86 100644
--- a/test/ThriftTest.thrift
+++ b/test/ThriftTest.thrift
@@ -28,7 +28,7 @@
 struct Insanity
 {
   map<Numberz, UserId> userMap = 0,
-  list<Xtruct> xtructList = 1
+  list<Xtruct> xtructs = 1
 }
 
 struct Empty {}
diff --git a/test/cpp/Makefile b/test/cpp/Makefile
index 693dbad..daaa15e 100644
--- a/test/cpp/Makefile
+++ b/test/cpp/Makefile
@@ -8,15 +8,24 @@
 ifndef thrift_home
 thrift_home=../../build
 endif #thrift_home
+
 target: all
 
+ifndef boost_home
+boost_home=../../../../../thirdparty/boost_1_33_1
+endif #thrift_home
+target: all
+
+include_paths = $(thrift_home)/include/thrift \
+		$(boost_home)
+
+include_flags = $(patsubst %,-I%, $(include_paths))
+
 # Tools
-THRIFT = thrift
+THRIFT = python ../../compiler/src/thrift.py ~/ws/thrift/dev/test/ThriftTest.thrift  --cpp
 CC     = g++
 LD     = g++
 
-include_flags = $(patsubst %,-I$(thrift_home)/include/%, thrift boost-1_33_1)
-
 # Compiler flags
 LIBS  = ../../lib/cpp/src/server/TSimpleServer.cc \
 	../../lib/cpp/src/protocol/TBinaryProtocol.cc \
@@ -24,8 +33,8 @@
 	../../lib/cpp/src/transport/TChunkedTransport.cc \
 	../../lib/cpp/src/transport/TServerSocket.cc \
 	../../lib/cpp/src/transport/TSocket.cc
-DCFL  = -Wall -O3 -g -Igen-cpp $(include_flags) $(LIBS)
-CFL   = -Wall -O3 -Igen-cpp $(include_flags) -L$(thrift_home)/lib -lthrift
+DCFL  = -Wall -O3 -g -I../cpp-gen $(include_flags) $(LIBS)
+CFL   = -Wall -O3 -I../cpp-gen $(include_flags) -L$(thrift_home)/lib -lthrift
 
 all: server client
 
@@ -35,16 +44,16 @@
 	$(THRIFT) -cpp ../ThriftTest.thrift
 
 server-debug: stubs
-	g++ -o TestServer $(DCFL) src/TestServer.cc gen-cpp/ThriftTest.cc
+	g++ -o TestServer $(DCFL) src/TestServer.cc ../cpp-gen/ThriftTest.cc
 
 client-debug: stubs
-	g++ -o TestClient $(DCFL) src/TestClient.cc gen-cpp/ThriftTest.cc
+	g++ -o TestClient $(DCFL) src/TestClient.cc ../cpp-gen/ThriftTest.cc
 
 server: stubs
-	g++ -o TestServer $(CFL) src/TestServer.cc gen-cpp/ThriftTest.cc
+	g++ -o TestServer $(CFL) src/TestServer.cc ../cpp-gen/ThriftTest.cc
 
 client: stubs
-	g++ -o TestClient $(CFL) src/TestClient.cc gen-cpp/ThriftTest.cc
+	g++ -o TestClient $(CFL) src/TestClient.cc ../cpp-gen/ThriftTest.cc
 
 clean:
-	rm -fr TestServer TestClient gen-cpp
+	rm -fr TestServer TestClient ../cpp-gen
diff --git a/test/cpp/src/TestServer.cc b/test/cpp/src/TestServer.cc
index eb95720..27a983c 100644
--- a/test/cpp/src/TestServer.cc
+++ b/test/cpp/src/TestServer.cc
@@ -215,6 +215,18 @@
 
     return insane;
   }
+
+  Xtruct testMulti(uint8_t arg0, int32_t arg1, uint64_t arg2, std::map<int16_t, std::string>  arg3, Numberz arg4, UserId arg5) {
+    printf("testMulti()\n");
+    
+    Xtruct hello;
+    hello.string_thing = "Hello2";
+    hello.byte_thing = arg0;
+    hello.i32_thing = arg1;
+    hello.i64_thing = (int64_t)arg2;
+
+    return hello;
+  }
 };
 
 int main(int argc, char **argv) {