From 1adbab031d1a452653a37c8bc220bddee334ff8d Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Tue, 31 Mar 2009 21:09:26 +0000 Subject: [PATCH] rb: The shared binary protocol specs lacked a test for read_message_begin git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760637 13f79535-47bb-0310-9956-ffa450edef68 --- lib/rb/spec/binaryprotocol_spec_shared.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/rb/spec/binaryprotocol_spec_shared.rb b/lib/rb/spec/binaryprotocol_spec_shared.rb index ee349640..a8a6e906 100644 --- a/lib/rb/spec/binaryprotocol_spec_shared.rb +++ b/lib/rb/spec/binaryprotocol_spec_shared.rb @@ -203,6 +203,11 @@ shared_examples_for 'a binary protocol' do lambda { @prot.write_string(nil) }.should raise_error end + it "should read message header correctly" do + @trans.write([protocol_class.const_get(:VERSION_1) | Thrift::MessageTypes::CALL, "testMessage".size, "testMessage", 17].pack("NNa11N")) + @prot.read_message_begin().should == ['testMessage', Thrift::MessageTypes::CALL, 17] + end + # message footer is a noop it "should read a field header" do -- 2.17.1