Home
last modified time | relevance | path

Searched refs:toByteString (Results 1 – 25 of 47) sorted by relevance

12

/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/test/java/com/google/protobuf/
DWireFormatTest.java63 ByteString rawBytes = message.toByteString(); in testSerialization()
74 ByteString rawBytes = message.toByteString(); in testSerializationPacked()
88 ByteString rawBytes = message.toByteString(); in testSerializeExtensions()
100 ByteString rawBytes = message.toByteString(); in testSerializePackedExtensions()
103 ByteString rawBytes2 = message2.toByteString(); in testSerializePackedExtensions()
136 ByteString rawBytes = message.toByteString(); in testSerializeExtensionsLite()
148 ByteString rawBytes = message.toByteString(); in testSerializePackedExtensionsLite()
151 ByteString rawBytes2 = message2.toByteString(); in testSerializePackedExtensionsLite()
162 ByteString rawBytes = message.toByteString(); in testParseExtensions()
175 ByteString rawBytes = message.toByteString(); in testParsePackedExtensions()
[all …]
DUnknownFieldSetTest.java57 allFieldsData = allFields.toByteString(); in setUp()
90 return bizarroFields.build().toByteString(); in getBizarroData()
154 ByteString data = emptyMessage.toByteString(); in testSerialize()
228 ByteString data = fields.toByteString(); in testParseKnownAndUnknown()
262 assertEquals(allFieldsData, message.toByteString()); in testUnknownExtensions()
303 .toByteString(); in testParseUnknownEnumValue()
349 .toByteString(); in testLargeVarint()
455 ByteString data = emptyMessageLite.toByteString(); in testSerializeLite()
463 ByteString allExtensionsData = allExtensions.toByteString(); in testAllExtensionsLite()
466 ByteString data = emptyMessageLite.toByteString(); in testAllExtensionsLite()
[all …]
DUnknownFieldSetLiteTest.java55 assertEquals(ByteString.EMPTY, toByteString(unknownFields)); in testDefaultInstance()
68 assertEquals(foo.toByteString(), toByteString(instance)); in testMergeFieldFrom()
81 assertEquals(foo.toByteString().size(), instance.getSerializedSize()); in testSerializedSize()
89 CodedInputStream.newInstance(toByteString(unknownFields).toByteArray()); in testMergeVarintField()
103 CodedInputStream.newInstance(toByteString(builder).toByteArray()); in testMergeVarintField_negative()
132 CodedInputStream.newInstance(toByteString(unknownFields).toByteArray()); in testMutableCopyOf()
152 assertEquals(ByteString.EMPTY, toByteString(unknownFields)); in testMutableCopyOf_empty()
201 Foo.parseFrom(byteStringOutput.toByteString()); in testMissingStartGroupTag()
216 Foo.parseFrom(byteStringOutput.toByteString()); in testMissingEndGroupTag()
232 Foo.parseFrom(byteStringOutput.toByteString()); in testMismatchingGroupTags()
[all …]
DAbstractMessageTest.java241 TestAllTypes.parseFrom(abstractMessage.toByteString())); in testSerialization()
243 assertEquals(TestUtil.getAllSet().toByteString(), in testSerialization()
244 abstractMessage.toByteString()); in testSerialization()
251 builder.mergeFrom(TestUtil.getAllSet().toByteString()).build(); in testParsing()
258 ByteString bytes = builder.buildPartial().toByteString(); in testParsingUninitialized()
288 TestPackedTypes.parseFrom(abstractMessage.toByteString())); in testPackedSerialization()
290 assertEquals(TestUtil.getPackedSet().toByteString(), in testPackedSerialization()
291 abstractMessage.toByteString()); in testPackedSerialization()
298 builder.mergeFrom(TestUtil.getPackedSet().toByteString()).build(); in testPackedParsing()
307 TestUnpackedTypes.parseFrom(abstractMessage.toByteString())); in testUnpackedSerialization()
[all …]
DLazyFieldLiteTest.java105 assertEquals(message.toByteString(), lazyField.toByteString()); in testGetByteString()
107 assertNotEqual(message.toByteString(), lazyField.toByteString()); in testGetByteString()
113 assertEquals(message.toByteString(), lazyField.toByteString()); in testGetByteStringEx()
115 assertNotEqual(message.toByteString(), lazyField.toByteString()); in testGetByteStringEx()
131 assertEquals(ByteString.EMPTY, field.toByteString()); in testEmptyLazyField()
141 assertEquals(ByteString.EMPTY, field.toByteString()); in testInvalidProto()
256 ByteString bytes = message.toByteString(); in createLazyFieldLiteFromMessage()
DParserTest.java78 message.toByteString(), registry)); in assertRoundTripEquals()
98 assertMessageEquals(message, parser.parseFrom(message.toByteString())); in assertRoundTripEquals()
111 assertEquals(expected.toByteString(), actual.toByteString()); in assertMessageEquals()
139 partialMessage.toByteString())); in assertParsePartial()
155 parser.parseFrom(partialMessage.toByteString()); in assertParsePartial()
218 TestEmptyMessage.parser().parseFrom(TestUtil.getAllSet().toByteString()); in testParseUnknownFields()
220 TestUtil.getAllSet().toByteString(), in testParseUnknownFields()
221 emptyMessage.toByteString()); in testParseUnknownFields()
294 .build().toByteString(); in testParsingMerge()
356 .build().toByteString(); in testParsingMergeLite()
DLazyStringEndToEndTest.java63 .toByteString(); in setUp()
73 ByteString bytes = tV2.toByteString(); in testParseAndSerialize()
77 bytes = tV2.toByteString(); in testParseAndSerialize()
110 proto.toByteString(); in testCaching()
DFieldPresenceTest.java163 assertEquals(ByteString.EMPTY, message.toByteString()); in testLazyField()
172 TestAllTypes parsed = TestAllTypes.parseFrom(message.toByteString()); in testLazyField()
338 ByteString data = builder.build().toByteString(); in testSerializeAndParse()
364 ByteString data = builder.build().toByteString(); in testRepeatedFields()
420 ByteString data = message.toByteString(); in testUnknownFields()
426 0, optionalOnlyMessage.getUnknownFields().toByteString().size()); in testUnknownFields()
428 message = TestAllTypes.parseFrom(optionalOnlyMessage.toByteString()); in testUnknownFields()
439 0, dynamicOptionalOnlyMessage.getUnknownFields().toByteString().size()); in testUnknownFields()
440 assertEquals(optionalOnlyMessage.toByteString(), in testUnknownFields()
441 dynamicOptionalOnlyMessage.toByteString()); in testUnknownFields()
DDynamicMessageTest.java105 newBuilder.mergeFrom(message.toByteString()); in testUnknownFields()
172 ByteString rawBytes = message.toByteString(); in testDynamicMessageSerialization()
178 assertEquals(TestUtil.getAllSet().toByteString(), rawBytes); in testDynamicMessageSerialization()
186 ByteString rawBytes = message.toByteString(); in testDynamicMessageParsing()
198 ByteString rawBytes = TestUtil.getAllExtensionsSet().toByteString(); in testDynamicMessageExtensionParsing()
216 ByteString rawBytes = message.toByteString(); in testDynamicMessagePackedSerialization()
222 assertEquals(TestUtil.getPackedSet().toByteString(), rawBytes); in testDynamicMessagePackedSerialization()
230 ByteString rawBytes = message.toByteString(); in testDynamicMessagePackedParsing()
DCheckUtf8Test.java61 BytesWrapper.newBuilder().setReq(UTF8_BYTE_STRING).build().toByteString(); in testParseRequiredStringWithGoodUtf8()
94 BytesWrapper.newBuilder().setReq(NON_UTF8_BYTE_STRING).build().toByteString(); in testParseRequiredStringWithBadUtf8()
132 BytesWrapperSize.newBuilder().setReq(NON_UTF8_BYTE_STRING).build().toByteString(); in testParseRequiredStringWithBadUtf8Size()
DCodedInputStreamTest.java408 TestAllTypes.parseFrom(message.toByteString().newInput()); in testReadHugeBlob()
429 CodedInputStream input = rawOutput.toByteString().newCodedInput(); in testReadMaliciouslyLargeBlob()
460 ByteString data100 = makeRecursiveMessage(100).toByteString(); in testMaliciousRecursion()
461 ByteString data101 = makeRecursiveMessage(101).toByteString(); in testMaliciousRecursion()
491 TestUtil.getAllSet().toByteString().newInput(), 16)); in testSizeLimit()
571 new ByteArrayInputStream(rawOutput.toByteString().toByteArray())); in testReadString()
596 new ByteArrayInputStream(rawOutput.toByteString().toByteArray())); in testReadStringRequireUtf8()
617 CodedInputStream input = rawOutput.toByteString().newCodedInput(); in testReadStringInvalidUtf8()
637 CodedInputStream input = rawOutput.toByteString().newCodedInput(); in testReadStringRequireUtf8InvalidUtf8()
694 CodedInputStream inputStream = rawOutput.toByteString().newCodedInput(); in testReadByteArray()
[all …]
DLazyMessageLiteTest.java258 ByteString data1 = outer.toByteString(); in testMergeOneofMessages()
266 ByteString data2 = outer.toByteString(); in testMergeOneofMessages()
285 ByteString bytes = outer.toByteString(); in testSerialize()
304 assertEquals(bytes, deserialized.toByteString()); in testSerialize()
DMapForProto2LiteTest.java379 assertEquals(message.getSerializedSize(), message.toByteString().size()); in testSerializeAndParse()
380 message = TestMap.parser().parseFrom(message.toByteString()); in testSerializeAndParse()
386 assertEquals(message.getSerializedSize(), message.toByteString().size()); in testSerializeAndParse()
387 message = TestMap.parser().parseFrom(message.toByteString()); in testSerializeAndParse()
393 assertEquals(message.getSerializedSize(), message.toByteString().size()); in testSerializeAndParse()
394 message = TestMap.parser().parseFrom(message.toByteString()); in testSerializeAndParse()
490 ByteString data = builder.build().toByteString(); in testUnknownEnumValues()
498 data = message.toByteString(); in testUnknownEnumValues()
DByteStringTest.java415 ByteString byteString = output.toByteString(); in testNewOutput_InitialCapacity()
437 ByteString byteString = output.toByteString(); in testNewOutput_ArrayWrite()
457 ByteString byteString = output.toByteString(); in testNewOutput_WriteChar()
489 isArrayRange(output.toByteString().toByteArray(), in testNewOutput_Mixed()
492 ByteString byteString = output.toByteString(); in testNewOutput_Mixed()
500 ByteString byteString = ByteString.newOutput().toByteString(); in testNewOutputEmpty()
510 ByteString byteString = os.toByteString(); in testNewOutput_Mutating()
DMapForProto2Test.java511 assertEquals(message.getSerializedSize(), message.toByteString().size()); in testSerializeAndParse()
512 message = TestMap.parser().parseFrom(message.toByteString()); in testSerializeAndParse()
518 assertEquals(message.getSerializedSize(), message.toByteString().size()); in testSerializeAndParse()
519 message = TestMap.parser().parseFrom(message.toByteString()); in testSerializeAndParse()
525 assertEquals(message.getSerializedSize(), message.toByteString().size()); in testSerializeAndParse()
526 message = TestMap.parser().parseFrom(message.toByteString()); in testSerializeAndParse()
782 .newBuilderForType().mergeFrom(message.toByteString()).build(); in testDynamicMessage()
825 ByteString data = builder.build().toByteString(); in testUnknownEnumValues()
835 data = message.toByteString(); in testUnknownEnumValues()
863 ByteString data = builder.build().toByteString(); in testRecursiveMap()
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/
DWireFormatTest.java60 ByteString rawBytes = message.toByteString(); in testSerialization()
71 ByteString rawBytes = message.toByteString(); in testSerializationPacked()
85 ByteString rawBytes = message.toByteString(); in testSerializeExtensions()
97 ByteString rawBytes = message.toByteString(); in testSerializePackedExtensions()
100 ByteString rawBytes2 = message2.toByteString(); in testSerializePackedExtensions()
133 ByteString rawBytes = message.toByteString(); in testParseExtensions()
146 ByteString rawBytes = message.toByteString(); in testParsePackedExtensions()
206 .build().toByteString(); in testInterleavedFieldsAndExtensions()
217 .build().toByteString(); in testInterleavedFieldsAndExtensions()
240 TestFieldOrderings.parseFrom(source.toByteString(), in testParseMultipleExtensionRanges()
[all …]
DAbstractMessageTest.java218 TestAllTypes.parseFrom(abstractMessage.toByteString())); in testSerialization()
220 assertEquals(TestUtil.getAllSet().toByteString(), in testSerialization()
221 abstractMessage.toByteString()); in testSerialization()
228 builder.mergeFrom(TestUtil.getAllSet().toByteString()).build(); in testParsing()
235 ByteString bytes = builder.buildPartial().toByteString(); in testParsingUninitialized()
265 TestPackedTypes.parseFrom(abstractMessage.toByteString())); in testPackedSerialization()
267 assertEquals(TestUtil.getPackedSet().toByteString(), in testPackedSerialization()
268 abstractMessage.toByteString()); in testPackedSerialization()
275 builder.mergeFrom(TestUtil.getPackedSet().toByteString()).build(); in testPackedParsing()
284 TestUnpackedTypes.parseFrom(abstractMessage.toByteString())); in testUnpackedSerialization()
[all …]
DParserTest.java77 message.toByteString(), registry)); in assertRoundTripEquals()
94 assertMessageEquals(message, parser.parseFrom(message.toByteString())); in assertRoundTripEquals()
106 assertEquals(expected.toByteString(), actual.toByteString()); in assertMessageEquals()
133 partialMessage.toByteString())); in testParsePartial()
149 parser.parseFrom(partialMessage.toByteString()); in testParsePartial()
188 TestUtil.getAllSet().toByteString()); in testParseUnknownFields()
190 TestUtil.getAllSet().toByteString(), in testParseUnknownFields()
191 emptyMessage.toByteString()); in testParseUnknownFields()
255 .build().toByteString(); in testParsingMerge()
DDynamicMessageTest.java102 newBuilder.mergeFrom(message.toByteString()); in testUnknownFields()
169 ByteString rawBytes = message.toByteString(); in testDynamicMessageSerialization()
175 assertEquals(TestUtil.getAllSet().toByteString(), rawBytes); in testDynamicMessageSerialization()
183 ByteString rawBytes = message.toByteString(); in testDynamicMessageParsing()
195 ByteString rawBytes = TestUtil.getAllExtensionsSet().toByteString(); in testDynamicMessageExtensionParsing()
213 ByteString rawBytes = message.toByteString(); in testDynamicMessagePackedSerialization()
219 assertEquals(TestUtil.getPackedSet().toByteString(), rawBytes); in testDynamicMessagePackedSerialization()
227 ByteString rawBytes = message.toByteString(); in testDynamicMessagePackedParsing()
DLazyStringEndToEndTest.java64 .toByteString(); in setUp()
74 ByteString bytes = tV2.toByteString(); in testParseAndSerialize()
78 bytes = tV2.toByteString(); in testParseAndSerialize()
DUnknownFieldSetTest.java54 allFieldsData = allFields.toByteString(); in setUp()
87 return bizarroFields.build().toByteString(); in getBizarroData()
151 ByteString data = emptyMessage.toByteString(); in testSerialize()
218 ByteString data = fields.toByteString(); in testParseKnownAndUnknown()
252 assertEquals(allFieldsData, message.toByteString()); in testUnknownExtensions()
293 .toByteString(); in testParseUnknownEnumValue()
339 .toByteString(); in testLargeVarint()
DByteStringTest.java375 ByteString byteString = output.toByteString(); in testNewOutput_InitialCapacity()
397 ByteString byteString = output.toByteString(); in testNewOutput_ArrayWrite()
417 ByteString byteString = output.toByteString(); in testNewOutput_WriteChar()
449 isArrayRange(output.toByteString().toByteArray(), in testNewOutput_Mixed()
452 ByteString byteString = output.toByteString(); in testNewOutput_Mixed()
460 ByteString byteString = ByteString.newOutput().toByteString(); in testNewOutputEmpty()
470 ByteString byteString = os.toByteString(); in testNewOutput_Mutating()
DCodedInputStreamTest.java348 TestAllTypes.parseFrom(message.toByteString().newInput()); in testReadHugeBlob()
373 CodedInputStream input = rawOutput.toByteString().newCodedInput(); in testReadMaliciouslyLargeBlob()
439 CodedInputStream input = rawOutput.toByteString().newCodedInput(); in testReadInvalidUtf8()
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/main/java/com/google/protobuf/
DLazyFieldLite.java157 return toByteString().equals(other.toByteString()); in equals()
300 setValue(mergeValueAndBytes(this.value, other.toByteString(), other.extensionRegistry)); in merge()
303 setValue(mergeValueAndBytes(other.value, this.toByteString(), this.extensionRegistry)); in merge()
307 setValue(mergeValueAndBytes(this.value, other.toByteString(), EMPTY_REGISTRY)); in merge()
396 public ByteString toByteString() { in toByteString() method in LazyFieldLite
412 memoizedBytes = value.toByteString(); in toByteString()
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/util/src/main/java/com/google/protobuf/util/
DJsonFormat.java682 private ByteString toByteString(MessageOrBuilder message) { in toByteString() method in JsonFormat.PrinterImpl
684 return ((Message) message).toByteString(); in toByteString()
686 return ((Message.Builder) message).build().toByteString(); in toByteString()
692 Timestamp value = Timestamp.parseFrom(toByteString(message)); in printTimestamp()
698 Duration value = Duration.parseFrom(toByteString(message)); in printDuration()
704 FieldMask value = FieldMask.parseFrom(toByteString(message)); in printFieldMask()
1243 builder.setField(valueField, contentBuilder.build().toByteString()); in mergeAny()
1249 builder.mergeFrom(value.toByteString()); in mergeFieldMask()
1256 builder.mergeFrom(value.toByteString()); in mergeTimestamp()
1266 builder.mergeFrom(value.toByteString()); in mergeDuration()
[all …]

12