Home
last modified time | relevance | path

Searched refs:getSerializedSize (Results 1 – 25 of 56) sorted by relevance

123

/third_party/protobuf/java/core/src/test/java/com/google/protobuf/
DWellKnownTypesTest.java54 assertEquals(0, message.getAnyField().getSerializedSize()); in testWellKnownTypes()
55 assertEquals(0, message.getApiField().getSerializedSize()); in testWellKnownTypes()
56 assertEquals(0, message.getDurationField().getSerializedSize()); in testWellKnownTypes()
57 assertEquals(0, message.getEmptyField().getSerializedSize()); in testWellKnownTypes()
58 assertEquals(0, message.getFieldMaskField().getSerializedSize()); in testWellKnownTypes()
59 assertEquals(0, message.getSourceContextField().getSerializedSize()); in testWellKnownTypes()
60 assertEquals(0, message.getStructField().getSerializedSize()); in testWellKnownTypes()
61 assertEquals(0, message.getTimestampField().getSerializedSize()); in testWellKnownTypes()
62 assertEquals(0, message.getTypeField().getSerializedSize()); in testWellKnownTypes()
63 assertEquals(0, message.getInt32Field().getSerializedSize()); in testWellKnownTypes()
DLazyFieldLiteTest.java86 assertEquals(message.getSerializedSize(), lazyField.getSerializedSize()); in testGetSerializedSize()
88 assertNotEqual(message.getSerializedSize(), lazyField.getSerializedSize()); in testGetSerializedSize()
94 assertEquals(message.getSerializedSize(), lazyField.getSerializedSize()); in testGetSerializedSizeEx()
96 assertNotEqual(message.getSerializedSize(), lazyField.getSerializedSize()); in testGetSerializedSizeEx()
127 assertEquals(0, field.getSerializedSize()); in testEmptyLazyField()
137 assertEquals(0, field.getSerializedSize()); in testInvalidProto()
DAbstractProto3SchemaTest.java127 assertEquals(expectedMessage.getSerializedSize(), empty.getSerializedSize()); in preserveUnknownFields()
137 assertEquals(payload.length, empty.getSerializedSize()); in preserveUnknownFieldsProto2()
DWireFormatTest.java68 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerialization()
79 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializationPacked()
93 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializeExtensions()
478 ByteString.CodedBuilder out = ByteString.newCodedBuilder(raw.getSerializedSize()); in testMergeMessageSetExtensionWithFlag()
504 assertEquals(rawBytes.size(), message.getSerializedSize()); in testOneofWireFormat()
DDiscardUnknownFieldsTest.java86 assertEquals(message.getClass().getName(), 0, parsed.getSerializedSize()); in assertReuseCodedInputStreamPreserve()
115 assertEquals(message.getClass().getName(), 0, parsed.getSerializedSize()); in assertUnknownFieldsExplicitlyDiscarded()
DAbstractProto3LiteSchemaTest.java129 assertEquals(expectedMessage.getSerializedSize(), empty.getSerializedSize()); in retainUnknownFields()
DWireFormatLiteTest.java70 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializeExtensionsLite()
122 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerialization()
133 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializationPacked()
147 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializeExtensions()
466 ByteString.CodedBuilder out = ByteString.newCodedBuilder(raw.getSerializedSize()); in testMergeMessageSetExtensionWithFlag()
491 assertEquals(rawBytes.size(), message.getSerializedSize()); in testOneofWireFormat()
DAbstractMessageTest.java261 assertEquals(message.getSerializedSize(), abstractMessage.getSerializedSize()); in testSerializedSize()
359 assertEquals(2, message.getSerializedSize()); in testOptimizedForSize()
DTestBadIdentifiersLite.java66 assertEquals(0, message.getMessageFieldCount15().getSerializedSize()); in testConflictingFieldNames()
DCodedOutputStreamTest.java344 Coder coder = outputType.newCoder(message.getSerializedSize()); in testWriteWholeMessage()
369 Coder coder = outputType.newCoder(message.getSerializedSize()); in testWriteWholePackedFieldsMessage()
386 Coder coder = outputType.newCoder(message.getSerializedSize()); in testWriteMessageWithNegativeEnumValue()
696 Coder coder = outputType.newCoder(testAllTypes.getSerializedSize());
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/
DAbstractMessageLite.java58 final ByteString.CodedBuilder out = ByteString.newCodedBuilder(getSerializedSize()); in toByteString()
69 final byte[] result = new byte[getSerializedSize()]; in toByteArray()
81 final int bufferSize = CodedOutputStream.computePreferredBufferSize(getSerializedSize()); in writeTo()
89 final int serialized = getSerializedSize(); in writeDelimitedTo()
110 int getSerializedSize(Schema schema) { in getSerializedSize() method in AbstractMessageLite
113 memoizedSerializedSize = schema.getSerializedSize(this); in getSerializedSize()
DUnknownFieldSet.java151 ByteString.CodedBuilder out = ByteString.newCodedBuilder(getSerializedSize()); in toByteString()
167 byte[] result = new byte[getSerializedSize()]; in toByteArray()
192 codedOutput.writeUInt32NoTag(getSerializedSize()); in writeDelimitedTo()
199 public int getSerializedSize() { in getSerializedSize() method in UnknownFieldSet
203 result += entry.getValue().getSerializedSize(entry.getKey()); in getSerializedSize()
759 ByteString.newCodedBuilder(getSerializedSize(fieldNumber)); in toByteString()
788 public int getSerializedSize(int fieldNumber) { in getSerializedSize() method in UnknownFieldSet.Field
DUnknownFieldSetLiteSchema.java132 int getSerializedSize(UnknownFieldSetLite unknowns) { in getSerializedSize() method in UnknownFieldSetLiteSchema
133 return unknowns.getSerializedSize(); in getSerializedSize()
DUnknownFieldSetSchema.java124 int getSerializedSize(UnknownFieldSet message) { in getSerializedSize() method in UnknownFieldSetSchema
125 return message.getSerializedSize(); in getSerializedSize()
DCodedOutputStream.java857 return computeLengthDelimitedFieldSize(value.getSerializedSize()); in computeLazyFieldSizeNoTag()
877 return computeLengthDelimitedFieldSize(value.getSerializedSize()); in computeMessageSizeNoTag()
882 return computeLengthDelimitedFieldSize(((AbstractMessageLite) value).getSerializedSize(schema)); in computeMessageSizeNoTag()
1076 return value.getSerializedSize(); in computeGroupSizeNoTag()
1082 return ((AbstractMessageLite) value).getSerializedSize(schema); in computeGroupSizeNoTag()
1281 writeUInt32NoTag(((AbstractMessageLite) value).getSerializedSize(schema)); in writeMessage()
1305 writeUInt32NoTag(value.getSerializedSize()); in writeMessageNoTag()
1311 writeUInt32NoTag(((AbstractMessageLite) value).getSerializedSize(schema)); in writeMessageNoTag()
1671 writeUInt32NoTag(value.getSerializedSize()); in writeMessageNoTag()
1677 writeUInt32NoTag(((AbstractMessageLite) value).getSerializedSize(schema)); in writeMessageNoTag()
[all …]
DLazyFieldLite.java354 public int getSerializedSize() { in getSerializedSize() method in LazyFieldLite
362 return value.getSerializedSize(); in getSerializedSize()
DMapFieldSchema.java62 int getSerializedSize(int fieldNumber, Object mapField, Object mapDefaultEntry); in getSerializedSize() method
DSchema.java84 int getSerializedSize(T message); in getSerializedSize() method
DDynamicMessage.java256 public int getSerializedSize() { in getSerializedSize() method in DynamicMessage
264 size = fields.getSerializedSize(); in getSerializedSize()
265 size += unknownFields.getSerializedSize(); in getSerializedSize()
DMessageLite.java77 int getSerializedSize(); in getSerializedSize() method
DMapFieldSchemaLite.java88 public int getSerializedSize(int fieldNumber, Object mapField, Object mapDefaultEntry) { in getSerializedSize() method in MapFieldSchemaLite
/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/
DWireFormatTest.java61 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerialization()
72 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializationPacked()
86 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializeExtensions()
157 assertEquals(TestUtil.getAllSet().getSerializedSize(), in testExtensionsSerializedSize()
158 TestUtil.getAllExtensionsSet().getSerializedSize()); in testExtensionsSerializedSize()
DAbstractMessageTest.java210 assertEquals(message.getSerializedSize(), in testSerializedSize()
211 abstractMessage.getSerializedSize()); in testSerializedSize()
321 assertEquals(2, message.getSerializedSize()); in testOptimizedForSize()
DDynamicMessageTest.java159 assertEquals(message.getSerializedSize(), in testDynamicMessageSerializedSize()
160 dynamicMessage.getSerializedSize()); in testDynamicMessageSerializedSize()
/third_party/protobuf/java/lite/src/test/java/com/google/protobuf/
DLiteTest.java184 int size = message.getSerializedSize(); in testMemoization()
1236 assertEquals(0, message.getSerializedSize()); in testSanityCopyOnWrite()
1238 assertEquals(0, message.getSerializedSize()); in testSanityCopyOnWrite()
1243 assertEquals(0, message.getSerializedSize()); in testSanityCopyOnWrite()
1245 assertEquals(0, message.getSerializedSize()); in testSanityCopyOnWrite()
1248 assertEquals(0, builder.build().getSerializedSize()); in testSanityCopyOnWrite()
1251 assertEquals(0, message.getSerializedSize()); in testSanityCopyOnWrite()
1253 assertEquals(0, message.getSerializedSize()); in testSanityCopyOnWrite()
1258 assertEquals(0, message.getSerializedSize()); in testSanityCopyOnWrite()
1260 assertEquals(0, message.getSerializedSize()); in testSanityCopyOnWrite()
[all …]

123