diff options
author | James E. King, III <jking@apache.org> | 2017-09-22 11:41:10 -0700 |
---|---|---|
committer | James E. King, III <jking@apache.org> | 2017-09-22 15:15:30 -0700 |
commit | d3013f3fb5d83e201723cd97cab49d8203037c0d (patch) | |
tree | 4ee35620840b9b3b5440b8f4dfc30b1eaced5bfe /lib/cpp/test | |
parent | 4a6bff1c5bd7eabe71966454d90dddeb48ed4d37 (diff) | |
download | thrift-d3013f3fb5d83e201723cd97cab49d8203037c0d.tar.gz |
THRIFT-3766: add zlib getUnderlyingTransport method
Client: C++
This closes #1370
Diffstat (limited to 'lib/cpp/test')
-rw-r--r-- | lib/cpp/test/ZlibTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/cpp/test/ZlibTest.cpp b/lib/cpp/test/ZlibTest.cpp index a4479eb5a..ea54487eb 100644 --- a/lib/cpp/test/ZlibTest.cpp +++ b/lib/cpp/test/ZlibTest.cpp @@ -332,6 +332,12 @@ void test_no_write() { BOOST_CHECK_EQUAL(membuf->available_read(), (uint32_t)0); } +void test_get_underlying_transport() { + shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer()); + shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf)); + BOOST_CHECK_EQUAL(membuf.get(), zlib_trans->getUnderlyingTransport().get()); +} + /* * Initialization */ @@ -436,6 +442,7 @@ bool init_unit_test_suite() { add_tests(suite, gen_random_buffer(buf_len), buf_len, "random"); suite->add(BOOST_TEST_CASE(test_no_write)); + suite->add(BOOST_TEST_CASE(test_get_underlying_transport)); return true; } |