Lines Matching refs:TestMessage
103 TestMessage = pool.lookup("TestMessage").msgclass constant
122 m = TestMessage.new
137 m = TestMessage.new
162 m = TestMessage.new(:optional_int32 => -42,
176 m = TestMessage.new(:optional_int32 => -42,
185 m1 = TestMessage.new(:optional_int32 => 42)
186 m2 = TestMessage.new(:optional_int32 => 102)
196 TestMessage.new.hello
201 TestMessage.new.hello = "world"
208 TestMessage.new(:hello => "world")
218 TestMessage.new(:repeated_uint32 => "hello")
224 m = TestMessage.new
238 m.optional_msg = TestMessage.new # expects TestMessage2
250 m.repeated_msg.push TestMessage.new
255 m = TestMessage.new
277 data = TestMessage.encode(m)
314 m = TestMessage.new
318 m = TestMessage.new
350 m = TestMessage.new
360 l = Google::Protobuf::RepeatedField.new(:message, TestMessage)
361 l.push TestMessage.new
385 new_msg = TestMessage.new(:optional_int32 => 200)
578 m = Google::Protobuf::Map.new(:string, :message, TestMessage)
579 m["asdf"] = TestMessage.new
585 :string, :message, TestMessage,
586 { "a" => TestMessage.new(:optional_int32 => 42),
587 "b" => TestMessage.new(:optional_int32 => 84) })
609 :string, :message, TestMessage,
610 { "a" => TestMessage.new(:optional_int32 => 42),
611 "b" => TestMessage.new(:optional_int32 => 84) })
648 m.map_string_msg["e"] = TestMessage.new # wrong value type
773 m = TestMessage.new
787 m = TestMessage.new
805 m = TestMessage.new(:optional_int32 => 42,
815 m = TestMessage.new(:optional_int32 => 42,
817 m2 = TestMessage.new(:optional_int32 => 43,
837 m = TestMessage.new(:optional_int32 => 42,
845 data = TestMessage.encode m
846 m2 = TestMessage.decode data
850 m2 = Google::Protobuf.decode(TestMessage, data)
855 m = TestMessage.new(:optional_string => 'foo', :repeated_string => ['bar1', 'bar2'])
857 m2 = TestMessage.decode_json(json)
862 m2 = TestMessage.decode(proto)
868 m = TestMessage.new(:optional_string => 'foo', :repeated_string => ['bar1', 'bar2'])
872 decoded_msg = Google::Protobuf.decode(TestMessage, encoded_msg)
873 assert_equal TestMessage.decode(m.to_proto), decoded_msg
877 m = TestMessage.new(:optional_string => 'foo', :repeated_string => ['bar1', 'bar2'])
881 decoded_msg = Google::Protobuf.decode_json(TestMessage, encoded_msg)
882 assert_equal TestMessage.decode_json(m.to_json), decoded_msg
886 …m = TestMessage.new(:optional_bool => true, :optional_double => -10.100001, :optional_string => 'f…
970 m = TestMessage.new
1077 m = TestMessage.new
1084 data = TestMessage.encode(m)
1088 m = TestMessage.decode(data)
1089 data_new = TestMessage.encode(m)
1096 m = TestMessage.new(:optional_int32 => 1234)
1115 assert msgdef.msgclass == TestMessage
1130 m = TestMessage.new(:optional_int32 => 1234,
1146 json_text = TestMessage.encode_json(m)
1147 m2 = TestMessage.decode_json(json_text)