Home
last modified time | relevance | path

Searched refs:rawBytes (Results 1 – 22 of 22) sorted by relevance

/third_party/protobuf/objectivec/Tests/
DGPBWireFormatTests.m48 NSData* rawBytes = message.data;
49 [self assertFieldsInOrder:rawBytes];
50 XCTAssertEqual(message.serializedSize, (size_t)rawBytes.length);
52 TestAllTypes* message2 = [TestAllTypes parseFromData:rawBytes error:NULL];
61 NSData* rawBytes = message.data;
62 [self assertFieldsInOrder:rawBytes];
63 XCTAssertEqual(message.serializedSize, (size_t)rawBytes.length);
66 [TestPackedTypes parseFromData:rawBytes error:NULL];
78 NSData* rawBytes = message.data;
79 [self assertFieldsInOrder:rawBytes];
[all …]
DGPBPerfTests.m59 NSData* rawBytes = [message data];
61 message = [[TestAllTypes alloc] initWithData:rawBytes error:NULL];
178 NSData* rawBytes = [message data];
181 [[TestAllExtensions alloc] initWithData:rawBytes error:NULL];
192 NSData* rawBytes = [message data];
194 message = [[TestPackedTypes alloc] initWithData:rawBytes error:NULL];
205 NSData* rawBytes = [message data];
208 [[TestPackedExtensions alloc] initWithData:rawBytes error:NULL];
DGPBCodedOuputStreamTests.m346 NSData* rawBytes = message.data;
348 [self getDataFileNamed:@"golden_message" dataToWrite:rawBytes];
349 XCTAssertEqualObjects(rawBytes, goldenData);
362 XCTAssertEqualObjects(rawBytes, actual);
368 rawBytes = extensions.data;
370 dataToWrite:rawBytes];
371 XCTAssertEqualObjects(rawBytes, goldenData);
DGPBCodedInputStreamTests.m287 NSData* rawBytes = message.data;
288 XCTAssertEqual(message.serializedSize, (size_t)rawBytes.length);
291 [TestAllTypes parseFromData:rawBytes extensionRegistry:nil error:NULL];
297 NSData* rawBytes = message.data;
301 GPBCodedInputStream* input1 = [GPBCodedInputStream streamWithData:rawBytes];
302 GPBCodedInputStream* input2 = [GPBCodedInputStream streamWithData:rawBytes];
/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/
DDynamicMessageTest.java169 ByteString rawBytes = message.toByteString(); in testDynamicMessageSerialization() local
170 TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); in testDynamicMessageSerialization()
175 assertEquals(TestUtil.getAllSet().toByteString(), rawBytes); in testDynamicMessageSerialization() local
183 ByteString rawBytes = message.toByteString(); in testDynamicMessageParsing() local
186 DynamicMessage.parseFrom(TestAllTypes.getDescriptor(), rawBytes); in testDynamicMessageParsing()
190 Message message3 = message2.getParserForType().parseFrom(rawBytes); in testDynamicMessageParsing()
195 ByteString rawBytes = TestUtil.getAllExtensionsSet().toByteString(); in testDynamicMessageExtensionParsing() local
197 TestAllExtensions.getDescriptor(), rawBytes, in testDynamicMessageExtensionParsing()
203 rawBytes, TestUtil.getExtensionRegistry()); in testDynamicMessageExtensionParsing()
213 ByteString rawBytes = message.toByteString(); in testDynamicMessagePackedSerialization() local
[all …]
DWireFormatTest.java60 ByteString rawBytes = message.toByteString(); in testSerialization() local
61 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerialization()
63 TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); in testSerialization()
71 ByteString rawBytes = message.toByteString(); in testSerializationPacked() local
72 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializationPacked()
74 TestPackedTypes message2 = TestPackedTypes.parseFrom(rawBytes); in testSerializationPacked()
85 ByteString rawBytes = message.toByteString(); in testSerializeExtensions() local
86 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializeExtensions()
88 TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); in testSerializeExtensions()
97 ByteString rawBytes = message.toByteString(); in testSerializePackedExtensions() local
[all …]
DCodedInputStreamTest.java260 byte[] rawBytes = message.toByteArray(); in testReadWholeMessage()
261 assertEquals(rawBytes.length, message.getSerializedSize()); in testReadWholeMessage()
263 TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); in testReadWholeMessage()
269 new SmallBlockInputStream(rawBytes, blockSize)); in testReadWholeMessage()
277 byte[] rawBytes = message.toByteArray(); in testSkipWholeMessage()
281 CodedInputStream input1 = CodedInputStream.newInstance(rawBytes); in testSkipWholeMessage()
282 CodedInputStream input2 = CodedInputStream.newInstance(rawBytes); in testSkipWholeMessage()
301 byte[] rawBytes = new byte[] { 1, 2 }; in testSkipRawBytesBug()
302 CodedInputStream input = CodedInputStream.newInstance(rawBytes); in testSkipRawBytesBug()
316 byte[] rawBytes = new byte[] { 1, 2, 3, 4, 5 }; in testSkipRawBytesPastEndOfBufferWithLimit()
[all …]
DCodedOutputStreamTest.java283 byte[] rawBytes = message.toByteArray(); in testWriteWholeMessage()
284 assertEqualBytes(TestUtil.getGoldenMessage().toByteArray(), rawBytes); in testWriteWholeMessage() local
293 assertEqualBytes(rawBytes, rawOutput.toByteArray()); in testWriteWholeMessage()
302 byte[] rawBytes = message.toByteArray(); in testWriteWholePackedFieldsMessage()
304 rawBytes); in testWriteWholePackedFieldsMessage() local
314 byte[] rawBytes = message.toByteArray(); in testWriteMessageWithNegativeEnumValue()
315 SparseEnumMessage message2 = SparseEnumMessage.parseFrom(rawBytes); in testWriteMessageWithNegativeEnumValue()
/third_party/protobuf/java/core/src/test/java/com/google/protobuf/
DWireFormatTest.java67 ByteString rawBytes = message.toByteString(); in testSerialization() local
68 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerialization()
70 TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); in testSerialization()
78 ByteString rawBytes = message.toByteString(); in testSerializationPacked() local
79 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializationPacked()
81 TestPackedTypes message2 = TestPackedTypes.parseFrom(rawBytes); in testSerializationPacked()
92 ByteString rawBytes = message.toByteString(); in testSerializeExtensions() local
93 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializeExtensions()
95 TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); in testSerializeExtensions()
104 ByteString rawBytes = message.toByteString(); in testSerializePackedExtensions() local
[all …]
DWireFormatLiteTest.java69 ByteString rawBytes = message.toByteString(); in testSerializeExtensionsLite() local
70 assertEquals(rawBytes.size(), message.getSerializedSize()); in testSerializeExtensionsLite()
72 TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); in testSerializeExtensionsLite()
81 ByteString rawBytes = message.toByteString(); in testSerializePackedExtensionsLite() local
86 assertEquals(rawBytes, rawBytes2); in testSerializePackedExtensionsLite()
95 ByteString rawBytes = message.toByteString(); in testParseExtensionsLite() local
99 TestAllExtensionsLite message2 = TestAllExtensionsLite.parseFrom(rawBytes, registryLite); in testParseExtensionsLite()
108 ByteString rawBytes = message.toByteString(); in testParsePackedExtensionsLite() local
112 TestPackedExtensionsLite message2 = TestPackedExtensionsLite.parseFrom(rawBytes, registry); in testParsePackedExtensionsLite()
121 ByteString rawBytes = message.toByteString(); in testSerialization() local
[all …]
DDynamicMessageTest.java162 ByteString rawBytes = message.toByteString(); in testDynamicMessageSerialization() local
163 TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); in testDynamicMessageSerialization()
168 assertEquals(TestUtil.getAllSet().toByteString(), rawBytes); in testDynamicMessageSerialization() local
176 ByteString rawBytes = message.toByteString(); in testDynamicMessageParsing() local
178 Message message2 = DynamicMessage.parseFrom(TestAllTypes.getDescriptor(), rawBytes); in testDynamicMessageParsing()
182 Message message3 = message2.getParserForType().parseFrom(rawBytes); in testDynamicMessageParsing()
187 ByteString rawBytes = TestUtil.getAllExtensionsSet().toByteString(); in testDynamicMessageExtensionParsing() local
190 TestAllExtensions.getDescriptor(), rawBytes, TestUtil.getFullExtensionRegistry()); in testDynamicMessageExtensionParsing()
195 message.getParserForType().parseFrom(rawBytes, TestUtil.getExtensionRegistry()); in testDynamicMessageExtensionParsing()
204 ByteString rawBytes = message.toByteString(); in testDynamicMessagePackedSerialization() local
[all …]
DCodedOutputStreamTest.java347 byte[] rawBytes = coder.toByteArray(); in testWriteWholeMessage()
348 assertEqualBytes(outputType, expectedBytes, rawBytes); in testWriteWholeMessage()
372 byte[] rawBytes = coder.toByteArray(); in testWriteWholePackedFieldsMessage()
373 assertEqualBytes(outputType, expectedBytes, rawBytes); in testWriteWholePackedFieldsMessage()
389 byte[] rawBytes = coder.toByteArray(); in testWriteMessageWithNegativeEnumValue()
390 SparseEnumMessage message2 = SparseEnumMessage.parseFrom(rawBytes); in testWriteMessageWithNegativeEnumValue()
DCodedInputStreamTest.java371 byte[] rawBytes = message.toByteArray(); in testReadWholeMessage()
372 assertEquals(rawBytes.length, message.getSerializedSize()); in testReadWholeMessage()
377 TestAllTypes message2 = TestAllTypes.parseFrom(inputType.newDecoder(rawBytes, blockSize)); in testReadWholeMessage()
386 byte[] rawBytes = message.toByteArray(); in testSkipWholeMessage()
391 inputs[i] = inputTypes[i].newDecoder(rawBytes); in testSkipWholeMessage()
419 byte[] rawBytes = new byte[] {1, 2}; in testSkipRawBytesBug()
421 CodedInputStream input = inputType.newDecoder(rawBytes); in testSkipRawBytesBug()
434 byte[] rawBytes = new byte[] {1, 2, 3, 4, 5}; in testSkipRawBytesPastEndOfBufferWithLimit()
436 CodedInputStream input = inputType.newDecoder(rawBytes); in testSkipRawBytesPastEndOfBufferWithLimit()
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/
DMessageSetSchema.java171 ByteString rawBytes = null; in mergeFrom() local
200 rawBytes = (ByteString) registers.object1; in mergeFrom()
214 if (rawBytes != null) { in mergeFrom()
216 WireFormat.makeTag(typeId, WireFormat.WIRETYPE_LENGTH_DELIMITED), rawBytes); in mergeFrom() local
317 ByteString rawBytes = null; // If we encounter "message" before "typeId" in parseMessageSetItemOrUnknownField() local
342 rawBytes = reader.readBytes(); in parseMessageSetItemOrUnknownField()
356 if (rawBytes != null) { in parseMessageSetItemOrUnknownField()
360 extensionSchema.parseMessageSetItem(rawBytes, extension, extensionRegistry, extensions); in parseMessageSetItemOrUnknownField()
362 unknownFieldSchema.addLengthDelimited(unknownFields, typeId, rawBytes); in parseMessageSetItemOrUnknownField()
DMessageReflection.java899 ByteString rawBytes = null; // If we encounter "message" before "typeId" in mergeMessageSetExtensionFromCodedStream() local
930 rawBytes = null; in mergeMessageSetExtensionFromCodedStream()
935 rawBytes = input.readBytes(); in mergeMessageSetExtensionFromCodedStream()
946 if (rawBytes != null && typeId != 0) { // Zero is not a valid type ID. in mergeMessageSetExtensionFromCodedStream()
948 mergeMessageSetExtensionFromBytes(rawBytes, extension, extensionRegistry, target); in mergeMessageSetExtensionFromCodedStream()
950 if (rawBytes != null && unknownFields != null) { in mergeMessageSetExtensionFromCodedStream()
952 typeId, UnknownFieldSet.Field.newBuilder().addLengthDelimited(rawBytes).build()); in mergeMessageSetExtensionFromCodedStream()
959 ByteString rawBytes, in mergeMessageSetExtensionFromBytes() argument
972 rawBytes, extensionRegistry, field, extension.defaultInstance); in mergeMessageSetExtensionFromBytes()
976 LazyField lazyField = new LazyField(extension.defaultInstance, extensionRegistry, rawBytes); in mergeMessageSetExtensionFromBytes()
DGeneratedMessageLite.java707 ByteString rawBytes = null; // If we encounter "message" before "typeId" in mergeMessageSetExtensionFromCodedStream() local
730 rawBytes = null; in mergeMessageSetExtensionFromCodedStream()
735 rawBytes = input.readBytes(); in mergeMessageSetExtensionFromCodedStream()
746 if (rawBytes != null && typeId != 0) { // Zero is not a valid type ID. in mergeMessageSetExtensionFromCodedStream()
748 mergeMessageSetExtensionFromBytes(rawBytes, extensionRegistry, extension); in mergeMessageSetExtensionFromCodedStream()
750 if (rawBytes != null) { in mergeMessageSetExtensionFromCodedStream()
751 mergeLengthDelimitedField(typeId, rawBytes); in mergeMessageSetExtensionFromCodedStream()
769 ByteString rawBytes, in mergeMessageSetExtensionFromBytes() argument
781 subBuilder.mergeFrom(rawBytes, extensionRegistry); in mergeMessageSetExtensionFromBytes()
/third_party/protobuf/csharp/src/Google.Protobuf.Test/
DCodedInputStreamTest.cs315 byte[] rawBytes = message.ToByteArray(); in ReadWholeMessage_VaryingBlockSizes()
316 Assert.AreEqual(rawBytes.Length, message.CalculateSize()); in ReadWholeMessage_VaryingBlockSizes()
317 TestAllTypes message2 = TestAllTypes.Parser.ParseFrom(rawBytes); in ReadWholeMessage_VaryingBlockSizes()
323 … message2 = TestAllTypes.Parser.ParseFrom(new SmallBlockInputStream(rawBytes, blockSize)); in ReadWholeMessage_VaryingBlockSizes()
333 byte[] rawBytes = message.ToByteArray(); in ReadWholeMessage_VaryingBlockSizes_FromSequence()
334 Assert.AreEqual(rawBytes.Length, message.CalculateSize()); in ReadWholeMessage_VaryingBlockSizes_FromSequence()
335 TestAllTypes message2 = TestAllTypes.Parser.ParseFrom(rawBytes); in ReadWholeMessage_VaryingBlockSizes_FromSequence()
341 …e2 = TestAllTypes.Parser.ParseFrom(ReadOnlySequenceFactory.CreateWithContent(rawBytes, blockSize)); in ReadWholeMessage_VaryingBlockSizes_FromSequence()
DCodedOutputStreamTest.cs261 byte[] rawBytes = message.ToByteArray(); in WriteWholeMessage_VaryingBlockSizes()
270 Assert.AreEqual(rawBytes, rawOutput.ToArray()); in WriteWholeMessage_VaryingBlockSizes()
275 Assert.AreEqual(rawBytes, bufferWriter.WrittenSpan.ToArray()); in WriteWholeMessage_VaryingBlockSizes()
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
DCodedInputStreamTest.cs234 byte[] rawBytes = message.ToByteArray(); in ReadWholeMessage_VaryingBlockSizes()
235 Assert.AreEqual(rawBytes.Length, message.CalculateSize()); in ReadWholeMessage_VaryingBlockSizes()
236 TestAllTypes message2 = TestAllTypes.Parser.ParseFrom(rawBytes); in ReadWholeMessage_VaryingBlockSizes()
242 … message2 = TestAllTypes.Parser.ParseFrom(new SmallBlockInputStream(rawBytes, blockSize)); in ReadWholeMessage_VaryingBlockSizes()
DCodedOutputStreamTest.cs198 byte[] rawBytes = message.ToByteArray(); in WriteWholeMessage_VaryingBlockSizes()
207 Assert.AreEqual(rawBytes, rawOutput.ToArray()); in WriteWholeMessage_VaryingBlockSizes()
/third_party/node/deps/npm/node_modules/safer-buffer/
DPorting-Buffer.md232 const rawBytes = new Buffer(req.body.string)
233 const encoded = rawBytes.toString('base64')
242 - If `req.body.string` is the *number* `50`, the `rawBytes` would be 50 bytes:
/third_party/protobuf/objectivec/
DGPBMessage.m2045 NSData *rawBytes = nil;
2061 rawBytes =
2072 if (rawBytes != nil && typeId != 0) {
2075 [[GPBCodedInputStream alloc] initWithData:rawBytes];
2084 // rawBytes was created via a NoCopy, so it can be reusing a
2088 NSData *cloned = [NSData dataWithData:rawBytes];