THRIFT-926. cpp: remove "standalone" distinction in TZlibTransport
Now that TZlibTransport::flush() behaves the same way as other
transports, there is no need to distinguish between RPC and standalone
behavior for TZlibTransport.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005152 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/test/ZlibTest.cpp b/lib/cpp/test/ZlibTest.cpp
index e2403d7..1e9f187 100644
--- a/lib/cpp/test/ZlibTest.cpp
+++ b/lib/cpp/test/ZlibTest.cpp
@@ -143,7 +143,7 @@
void test_write_then_read(const uint8_t* buf, uint32_t buf_len) {
shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
- shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf, false));
+ shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
zlib_trans->write(buf, buf_len);
zlib_trans->finish();
@@ -162,12 +162,12 @@
// the stream was not complete. I'm about to go fix that.
// It worked. Awesome.
shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
- shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf, false));
+ shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
zlib_trans->write(buf, buf_len);
zlib_trans->finish();
string tmp_buf;
membuf->appendBufferToString(tmp_buf);
- zlib_trans.reset(new TZlibTransport(membuf, false,
+ zlib_trans.reset(new TZlibTransport(membuf,
TZlibTransport::DEFAULT_URBUF_SIZE,
tmp_buf.length()-1));
@@ -182,7 +182,7 @@
// Make sure we still get that "not complete" error if
// it really isn't complete.
shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
- shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf, false));
+ shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
zlib_trans->write(buf, buf_len);
zlib_trans->finish();
string tmp_buf;
@@ -209,7 +209,7 @@
const shared_ptr<SizeGenerator>& read_gen) {
// Try it with a mix of read/write sizes.
shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
- shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf, false));
+ shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
unsigned int tot;
tot = 0;
@@ -244,7 +244,7 @@
void test_invalid_checksum(const uint8_t* buf, uint32_t buf_len) {
// Verify checksum checking.
shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
- shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf, false));
+ shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
zlib_trans->write(buf, buf_len);
zlib_trans->finish();
string tmp_buf;
@@ -282,7 +282,7 @@
void test_write_after_flush(const uint8_t* buf, uint32_t buf_len) {
// write some data
shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
- shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf, false));
+ shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
zlib_trans->write(buf, buf_len);
// call finish()
@@ -321,7 +321,7 @@
{
// Create a TZlibTransport object, and immediately destroy it
// when it goes out of scope.
- TZlibTransport w_zlib_trans(membuf, false);
+ TZlibTransport w_zlib_trans(membuf);
}
BOOST_CHECK_EQUAL(membuf->available_read(), 0);