diff options
author | David Reiss <dreiss@apache.org> | 2010-08-30 22:05:48 +0000 |
---|---|---|
committer | David Reiss <dreiss@apache.org> | 2010-08-30 22:05:48 +0000 |
commit | f28f23d5b7fb08743c7a88b0f79cad69f604c013 (patch) | |
tree | c459d4f112d136c031339194c99339cc8f3fac59 /test/erl | |
parent | bc1b3fdb77eac0e2d705a9d363d6f3062bb146ee (diff) | |
download | thrift-f28f23d5b7fb08743c7a88b0f79cad69f604c013.tar.gz |
erlang: Update test_membuffer to use the new API
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990993 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/erl')
-rw-r--r-- | test/erl/src/test_membuffer.erl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/erl/src/test_membuffer.erl b/test/erl/src/test_membuffer.erl index 7bd23a0f1..e576ccdbf 100644 --- a/test/erl/src/test_membuffer.erl +++ b/test/erl/src/test_membuffer.erl @@ -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'), |