blob: 51f72b1628608d35561f0213c28cfb1f9eb2bf85 [file] [log] [blame]
Kevin Clarkf85e7932008-06-18 00:56:48 +00001$:.unshift File.dirname(__FILE__) + '/gen-rb'
2$:.unshift File.join(File.dirname(__FILE__), '../../lib/rb/lib')
Kevin Clark4bd89162008-07-08 00:47:49 +00003$:.unshift File.join(File.dirname(__FILE__), '../../lib/rb/ext')
Kevin Clark28580f42008-06-18 00:49:17 +00004
5require 'test/unit'
Kevin Clark4bd89162008-07-08 00:47:49 +00006
7module Thrift
8 module Struct
9 def ==(other)
10 return false unless other.is_a? self.class
11 self.class.const_get(:FIELDS).collect {|fid, data| data[:name] }.all? do |field|
12 send(field) == other.send(field)
13 end
14 end
15 end
16end