Commit ace4212e authored by Chris Fallin's avatar Chris Fallin

Line-wraps at 80 chars.

parent addd26cb
......@@ -479,7 +479,8 @@ module BasicTest
m["jkl;"] = TestMessage2.new
end
m = Google::Protobuf::Map.new(:string, :message, TestMessage,
m = Google::Protobuf::Map.new(
:string, :message, TestMessage,
{ "a" => TestMessage.new(:optional_int32 => 42),
"b" => TestMessage.new(:optional_int32 => 84) })
assert m.length == 2
......@@ -502,7 +503,8 @@ module BasicTest
end
def test_map_dup_deep_copy
m = Google::Protobuf::Map.new(:string, :message, TestMessage,
m = Google::Protobuf::Map.new(
:string, :message, TestMessage,
{ "a" => TestMessage.new(:optional_int32 => 42),
"b" => TestMessage.new(:optional_int32 => 84) })
......@@ -524,7 +526,8 @@ module BasicTest
assert m.map_string_int32 == {}
assert m.map_string_msg == {}
m = MapMessage.new(:map_string_int32 => {"a" => 1, "b" => 2},
m = MapMessage.new(
:map_string_int32 => {"a" => 1, "b" => 2},
:map_string_msg => {"a" => TestMessage2.new(:foo => 1),
"b" => TestMessage2.new(:foo => 2)})
assert m.map_string_int32.keys.sort == ["a", "b"]
......@@ -559,7 +562,8 @@ module BasicTest
end
def test_map_encode_decode
m = MapMessage.new(:map_string_int32 => {"a" => 1, "b" => 2},
m = MapMessage.new(
:map_string_int32 => {"a" => 1, "b" => 2},
:map_string_msg => {"a" => TestMessage2.new(:foo => 1),
"b" => TestMessage2.new(:foo => 2)})
m2 = MapMessage.decode(MapMessage.encode(m))
......@@ -638,7 +642,8 @@ module BasicTest
:repeated_string => ["a", "b", "c"],
:repeated_int32 => [42, 43, 44],
:repeated_enum => [:A, :B, :C, 100],
:repeated_msg => [TestMessage2.new(:foo => 1), TestMessage2.new(:foo => 2)])
:repeated_msg => [TestMessage2.new(:foo => 1),
TestMessage2.new(:foo => 2)])
data = TestMessage.encode m
m2 = TestMessage.decode data
assert m == m2
......
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