You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2010/08/31 00:05:48 UTC

svn commit: r990993 - /incubator/thrift/trunk/test/erl/src/test_membuffer.erl

Author: dreiss
Date: Mon Aug 30 22:05:48 2010
New Revision: 990993

URL: http://svn.apache.org/viewvc?rev=990993&view=rev
Log:
erlang: Update test_membuffer to use the new API

Modified:
    incubator/thrift/trunk/test/erl/src/test_membuffer.erl

Modified: incubator/thrift/trunk/test/erl/src/test_membuffer.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/erl/src/test_membuffer.erl?rev=990993&r1=990992&r2=990993&view=diff
==============================================================================
--- incubator/thrift/trunk/test/erl/src/test_membuffer.erl (original)
+++ incubator/thrift/trunk/test/erl/src/test_membuffer.erl Mon Aug 30 22:05:48 2010
@@ -30,12 +30,12 @@ test_data() ->
 
 t1() ->
     {ok, Transport} = thrift_memory_buffer:new(),
-    {ok, Protocol} = thrift_binary_protocol:new(Transport),
+    {ok, Protocol0} = thrift_binary_protocol:new(Transport),
     TestData = test_data(),
-    ok = thrift_protocol:write(Protocol,
+		{Protocol1, ok} = thrift_protocol:write(Protocol0,
 			       {{struct, element(2, thriftTest_types:struct_info('xtruct'))},
 				TestData}),
-    {ok, Result} = thrift_protocol:read(Protocol,
+		{_Protocol2, {ok, Result}} = thrift_protocol:read(Protocol1,
 					{struct, element(2, thriftTest_types:struct_info('xtruct'))},
 					'xtruct'),
 
@@ -44,12 +44,12 @@ t1() ->
 
 t2() ->
     {ok, Transport} = thrift_memory_buffer:new(),
-    {ok, Protocol} = thrift_binary_protocol:new(Transport),
+    {ok, Protocol0} = thrift_binary_protocol:new(Transport),
     TestData = test_data(),
-    ok = thrift_protocol:write(Protocol,
+		{Protocol1, ok} = thrift_protocol:write(Protocol0,
 			       {{struct, element(2, thriftTest_types:struct_info('xtruct'))},
 				TestData}),
-    {ok, Result} = thrift_protocol:read(Protocol,
+		{_Protocol2, {ok, Result}} = thrift_protocol:read(Protocol1,
 					{struct, element(2, thriftTest_types:struct_info('xtruct3'))},
 					'xtruct3'),
 
@@ -61,12 +61,12 @@ t2() ->
 
 t3() ->
     {ok, Transport} = thrift_memory_buffer:new(),
-    {ok, Protocol} = thrift_binary_protocol:new(Transport),
+    {ok, Protocol0} = thrift_binary_protocol:new(Transport),
     TestData = #bools{im_true = true, im_false = false},
-    ok = thrift_protocol:write(Protocol,
+		{Protocol1, ok} = thrift_protocol:write(Protocol0,
 			       {{struct, element(2, thriftTest_types:struct_info('bools'))},
 				TestData}),
-    {ok, Result} = thrift_protocol:read(Protocol,
+		{_Protocol2, {ok, Result}} = thrift_protocol:read(Protocol1,
 					{struct, element(2, thriftTest_types:struct_info('bools'))},
 					'bools'),