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 2009/03/30 22:46:52 UTC

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

Author: dreiss
Date: Mon Mar 30 20:46:52 2009
New Revision: 760163

URL: http://svn.apache.org/viewvc?rev=760163&view=rev
Log:
THRIFT-192. erlang: Commit test code missed in r757870

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=760163&r1=760162&r2=760163&view=diff
==============================================================================
--- incubator/thrift/trunk/test/erl/src/test_membuffer.erl (original)
+++ incubator/thrift/trunk/test/erl/src/test_membuffer.erl Mon Mar 30 20:46:52 2009
@@ -40,7 +40,23 @@
                       i64_thing = TestData#xtruct.i64_thing}.
 
 
+t3() ->
+    {ok, Transport} = thrift_memory_buffer:new(),
+    {ok, Protocol} = thrift_binary_protocol:new(Transport),
+    TestData = #bools{im_true = true, im_false = false},
+    ok = thrift_protocol:write(Protocol,
+			       {{struct, element(2, thriftTest_types:struct_info('bools'))},
+				TestData}),
+    {ok, Result} = thrift_protocol:read(Protocol,
+					{struct, element(2, thriftTest_types:struct_info('bools'))},
+					'bools'),
+
+    true = TestData#bools.im_true  =:= Result#bools.im_true,
+    true = TestData#bools.im_false =:= Result#bools.im_false.
+
+
 t() ->
     t1(),
-    t2().
+    t2(),
+    t3().