You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by br...@apache.org on 2009/03/31 23:09:26 UTC

svn commit: r760637 - /incubator/thrift/trunk/lib/rb/spec/binaryprotocol_spec_shared.rb

Author: bryanduxbury
Date: Tue Mar 31 21:09:26 2009
New Revision: 760637

URL: http://svn.apache.org/viewvc?rev=760637&view=rev
Log:
rb: The shared binary protocol specs lacked a test for read_message_begin

Modified:
    incubator/thrift/trunk/lib/rb/spec/binaryprotocol_spec_shared.rb

Modified: incubator/thrift/trunk/lib/rb/spec/binaryprotocol_spec_shared.rb
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/binaryprotocol_spec_shared.rb?rev=760637&r1=760636&r2=760637&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/binaryprotocol_spec_shared.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/binaryprotocol_spec_shared.rb Tue Mar 31 21:09:26 2009
@@ -203,6 +203,11 @@
     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