Commit 1e58006b authored by @rubynerd's avatar @rubynerd

test for field reassignment

parent f3e86fd2
......@@ -126,6 +126,12 @@ class RepeatedFieldTest < Test::Unit::TestCase
assert_equal false, m.repeated_string.empty?
end
def test_reassign
m = TestMessage.new
m.repeated_msg = Google::Protobuf::RepeatedField.new(:message, TestMessage2, [TestMessage2.new(:foo => 1)])
assert_equal m.repeated_msg.first, TestMessage2.new(:foo => 1)
end
def test_array_accessor
m = TestMessage.new
reference_arr = %w(foo bar baz)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment