THRIFT-5050 Fix MemoryBuffer.pm to raise a proper exception if no data is available
Client: perl
Patch: Kengo Seki
This closes #1967
diff --git a/lib/perl/t/memory_buffer.t b/lib/perl/t/memory_buffer.t
index 8fa9fd7..4a4ba0f 100644
--- a/lib/perl/t/memory_buffer.t
+++ b/lib/perl/t/memory_buffer.t
@@ -17,7 +17,8 @@
# under the License.
#
-use Test::More tests => 6;
+use Test::More tests => 7;
+use Test::Exception;
use strict;
use warnings;
@@ -33,6 +34,8 @@
my $transport = Thrift::MemoryBuffer->new();
my $protocol = Thrift::BinaryProtocol->new($transport);
+throws_ok { $protocol->readByte } 'Thrift::TTransportException';
+
my $a = ThriftTest::Xtruct->new();
$a->i32_thing(10);
$a->i64_thing(30);