From: Bryan Duxbury Date: Tue, 31 Mar 2009 21:09:26 +0000 (+0000) Subject: rb: The shared binary protocol specs lacked a test for read_message_begin X-Git-Tag: 0.2.0~179 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=1adbab031d1a452653a37c8bc220bddee334ff8d;p=common%2Fthrift.git 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 --- 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