summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reiss <dreiss@apache.org>2009-03-30 20:46:52 +0000
committerDavid Reiss <dreiss@apache.org>2009-03-30 20:46:52 +0000
commitb3c5f6e25f3f39aa32fa65477633b5871e5b534f (patch)
tree65da343e2e600c9361e8e45e830e781180faee6a
parent233ace53f04abe48b974aa0b51002ecb7134837b (diff)
downloadthrift-b3c5f6e25f3f39aa32fa65477633b5871e5b534f.tar.gz
THRIFT-192. erlang: Commit test code missed in r757870
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760163 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/erl/src/test_membuffer.erl18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/erl/src/test_membuffer.erl b/test/erl/src/test_membuffer.erl
index fdcdc8270..66f7f6c45 100644
--- a/test/erl/src/test_membuffer.erl
+++ b/test/erl/src/test_membuffer.erl
@@ -40,7 +40,23 @@ t2() ->
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().