thrift-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryanduxb...@apache.org
Subject svn commit: r763043 - in /incubator/thrift/trunk/lib/rb/spec: compact_protocol_spec.rb spec_helper.rb
Date Tue, 07 Apr 2009 23:45:16 GMT
Author: bryanduxbury
Date: Tue Apr  7 23:45:15 2009
New Revision: 763043

URL: http://svn.apache.org/viewvc?rev=763043&view=rev
Log:
THRIFT-444. rb: THRIFT-356 broke compact protocol spec

This patch cleans up the spec, removing some unncessary code.


Modified:
    incubator/thrift/trunk/lib/rb/spec/compact_protocol_spec.rb
    incubator/thrift/trunk/lib/rb/spec/spec_helper.rb

Modified: incubator/thrift/trunk/lib/rb/spec/compact_protocol_spec.rb
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/compact_protocol_spec.rb?rev=763043&r1=763042&r2=763043&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/compact_protocol_spec.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/compact_protocol_spec.rb Tue Apr  7 23:45:15 2009
@@ -76,21 +76,10 @@
 
     struct = CompactProtoTestStruct.new
     # sets and maps don't hash well... not sure what to do here.
-    struct.set_byte_map = nil
-    struct.map_byte_map = nil
     struct.write(proto)
-    
-    # puts trans.inspect
-    
-    struct2 = CompactProtoTestStruct.new
-    struct2.instance_variables.each do |ivar|
-      struct2.instance_variable_set(ivar, nil)
-    end
-    
-    struct2.should_not == struct
 
-    struct2.read(proto)
-    
+    struct2 = CompactProtoTestStruct.new
+    struct2.read(proto)    
     struct2.should == struct
   end
 

Modified: incubator/thrift/trunk/lib/rb/spec/spec_helper.rb
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/spec_helper.rb?rev=763043&r1=763042&r2=763043&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/spec_helper.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/spec_helper.rb Tue Apr  7 23:45:15 2009
@@ -45,9 +45,11 @@
 end
 
 require File.dirname(__FILE__) + "/../debug_proto_test/gen-rb/Srv"
+require File.dirname(__FILE__) + "/../debug_proto_test/gen-rb/debug_proto_test_constants"
 
 module Fixtures
-  COMPACT_PROTOCOL_TEST_STRUCT = CompactProtoTestStruct.new(:a_binary => [0,1,2,3,4,5,6,7,8].pack('c*'))
+  COMPACT_PROTOCOL_TEST_STRUCT = COMPACT_TEST.dup
+  COMPACT_PROTOCOL_TEST_STRUCT.a_binary = [0,1,2,3,4,5,6,7,8].pack('c*')
   COMPACT_PROTOCOL_TEST_STRUCT.set_byte_map = nil
   COMPACT_PROTOCOL_TEST_STRUCT.map_byte_map = nil
 end
\ No newline at end of file



Mime
View raw message