Home | History | Annotate | Download | only in protobuf

Lines Matching full:message

35 #include <google/protobuf/message.h>
74 protobuf_unittest::TestAllTypes message;
75 TestUtil::SetAllFields(&message);
81 EXPECT_TRUE(message.SerializeToString(&str1));
82 EXPECT_TRUE(message.AppendToString(&str2));
83 EXPECT_TRUE(message.SerializeToOstream(&stream));
95 EXPECT_TRUE(message.SerializeAsString() == str1);
101 protobuf_unittest::TestAllTypes message;
102 message.set_optional_int32(123);
104 EXPECT_FALSE(message.SerializeToOstream(&out));
112 unittest::TestAllTypes message;
113 EXPECT_TRUE(message.ParseFromFileDescriptor(file));
114 TestUtil::ExpectAllFieldsSet(message);
125 unittest::TestPackedTypes message;
126 EXPECT_TRUE(message.ParseFromFileDescriptor(file));
127 TestUtil::ExpectPackedFieldsSet(message);
139 protobuf_unittest::TestAllTypes message;
140 TestUtil::SetAllFields(&message);
141 message.SerializeToString(&data);
146 protobuf_unittest::TestAllTypes message;
147 EXPECT_TRUE(message.ParseFromString(data));
148 TestUtil::ExpectAllFieldsSet(message);
153 protobuf_unittest::TestAllTypes message;
155 EXPECT_TRUE(message.ParseFromIstream(&stream));
157 TestUtil::ExpectAllFieldsSet(message);
165 protobuf_unittest::TestAllTypes message;
166 EXPECT_TRUE(message.ParseFromBoundedZeroCopyStream(&stream, data.size()));
167 TestUtil::ExpectAllFieldsSet(message);
174 protobuf_unittest::TestAllTypes message;
176 message.ParseFromBoundedZeroCopyStream(&stream, data.size() + 1));
181 unittest::TestRequired message;
186 EXPECT_FALSE(message.ParseFromString(""));
191 EXPECT_EQ("Can't parse message of type \"protobuf_unittest.TestRequired\" "
197 unittest::TestRequired message;
200 EXPECT_TRUE(message.MergePartialFromCodedStream(&input));
204 unittest::TestRequired message;
205 EXPECT_EQ("a, b, c", message.InitializationErrorString());
211 unittest::TestRequired message;
213 EXPECT_DEBUG_DEATH(EXPECT_TRUE(message.SerializeToString(&data)),
214 "Can't serialize message of type \"protobuf_unittest.TestRequired\" because "
219 unittest::TestRequired message;
220 EXPECT_DEATH(message.CheckInitialized(),
221 "Message of type \"protobuf_unittest.TestRequired\" is missing required "
228 unittest::TestRequired message;
231 EXPECT_TRUE(message.SerializePartialToCodedStream(&output));
235 unittest::TestRequired message;
237 message.FindInitializationErrors(&errors);
245 unittest::TestAllTypes message;
248 EXPECT_TRUE(message.ParseFromArray("", 0));
251 EXPECT_FALSE(message.ParseFromArray("\0", 1));
254 EXPECT_FALSE(message.ParseFromArray("\200", 1));
257 EXPECT_FALSE(message.ParseFromArray("\014", 1));