bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // http://code.google.com/p/protobuf/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 package com.google.protobuf.test;
32 import com.google.protobuf.*;
33 
34 import junit.framework.TestCase;
35 
36 import java.io.ByteArrayInputStream;
37 import java.io.ByteArrayOutputStream;
38 import java.util.List;
39 
40 import protobuf_unittest.UnittestProto;
41 import protobuf_unittest.UnittestProto.TestAllExtensions;
42 import protobuf_unittest.UnittestProto.TestAllTypes;
43 import protobuf_unittest.UnittestProto.TestFieldOrderings;
44 import protobuf_unittest.UnittestProto.TestPackedExtensions;
45 import protobuf_unittest.UnittestProto.TestPackedTypes;
46 import protobuf_unittest.UnittestMset.TestMessageSet;
47 import protobuf_unittest.UnittestMset.RawMessageSet;
48 import protobuf_unittest.UnittestMset.TestMessageSetExtension1;
49 import protobuf_unittest.UnittestMset.TestMessageSetExtension2;
50 
56 public class WireFormatTest extends TestCase {
57  public void testSerialization() throws Exception {
58  TestAllTypes message = TestUtil.getAllSet();
59 
60  ByteString rawBytes = message.toByteString();
61  assertEquals(rawBytes.size(), message.getSerializedSize());
62 
63  TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes);
64 
65  TestUtil.assertAllFieldsSet(message2);
66  }
67 
68  public void testSerializationPacked() throws Exception {
69  TestPackedTypes message = TestUtil.getPackedSet();
70 
71  ByteString rawBytes = message.toByteString();
72  assertEquals(rawBytes.size(), message.getSerializedSize());
73 
74  TestPackedTypes message2 = TestPackedTypes.parseFrom(rawBytes);
75 
77  }
78 
79  public void testSerializeExtensions() throws Exception {
80  // TestAllTypes and TestAllExtensions should have compatible wire formats,
81  // so if we serialize a TestAllExtensions then parse it as TestAllTypes
82  // it should work.
83 
84  TestAllExtensions message = TestUtil.getAllExtensionsSet();
85  ByteString rawBytes = message.toByteString();
86  assertEquals(rawBytes.size(), message.getSerializedSize());
87 
88  TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes);
89 
90  TestUtil.assertAllFieldsSet(message2);
91  }
92 
93  public void testSerializePackedExtensions() throws Exception {
94  // TestPackedTypes and TestPackedExtensions should have compatible wire
95  // formats; check that they serialize to the same string.
96  TestPackedExtensions message = TestUtil.getPackedExtensionsSet();
97  ByteString rawBytes = message.toByteString();
98 
99  TestPackedTypes message2 = TestUtil.getPackedSet();
100  ByteString rawBytes2 = message2.toByteString();
101 
102  assertEquals(rawBytes, rawBytes2);
103  }
104 
106  throws Exception {
107  // Write directly to an OutputStream, without invoking getSerializedSize()
108  // This used to be a bug where the size of a packed field was incorrect,
109  // since getSerializedSize() was never invoked.
110  TestPackedTypes message = TestUtil.getPackedSet();
111 
112  // Directly construct a CodedOutputStream around the actual OutputStream,
113  // in case writeTo(OutputStream output) invokes getSerializedSize();
114  ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
115  CodedOutputStream codedOutput = CodedOutputStream.newInstance(outputStream);
116 
117  message.writeTo(codedOutput);
118 
119  codedOutput.flush();
120 
121  TestPackedTypes message2 = TestPackedTypes.parseFrom(
122  outputStream.toByteArray());
123 
125  }
126 
127  public void testParseExtensions() throws Exception {
128  // TestAllTypes and TestAllExtensions should have compatible wire formats,
129  // so if we serialize a TestAllTypes then parse it as TestAllExtensions
130  // it should work.
131 
132  TestAllTypes message = TestUtil.getAllSet();
133  ByteString rawBytes = message.toByteString();
134 
136 
137  TestAllExtensions message2 =
138  TestAllExtensions.parseFrom(rawBytes, registry);
139 
141  }
142 
143  public void testParsePackedExtensions() throws Exception {
144  // Ensure that packed extensions can be properly parsed.
145  TestPackedExtensions message = TestUtil.getPackedExtensionsSet();
146  ByteString rawBytes = message.toByteString();
147 
149 
150  TestPackedExtensions message2 =
151  TestPackedExtensions.parseFrom(rawBytes, registry);
152 
154  }
155 
156  public void testExtensionsSerializedSize() throws Exception {
157  assertEquals(TestUtil.getAllSet().getSerializedSize(),
158  TestUtil.getAllExtensionsSet().getSerializedSize());
159  }
160 
161  public void testSerializeDelimited() throws Exception {
162  ByteArrayOutputStream output = new ByteArrayOutputStream();
163  TestUtil.getAllSet().writeDelimitedTo(output);
164  output.write(12);
165  TestUtil.getPackedSet().writeDelimitedTo(output);
166  output.write(34);
167 
168  ByteArrayInputStream input = new ByteArrayInputStream(output.toByteArray());
169 
170  TestUtil.assertAllFieldsSet(TestAllTypes.parseDelimitedFrom(input));
171  assertEquals(12, input.read());
172  TestUtil.assertPackedFieldsSet(TestPackedTypes.parseDelimitedFrom(input));
173  assertEquals(34, input.read());
174  assertEquals(-1, input.read());
175 
176  // We're at EOF, so parsing again should return null.
177  assertTrue(TestAllTypes.parseDelimitedFrom(input) == null);
178  }
179 
180  private void assertFieldsInOrder(ByteString data) throws Exception {
181  CodedInputStream input = data.newCodedInput();
182  int previousTag = 0;
183 
184  while (true) {
185  int tag = input.readTag();
186  if (tag == 0) {
187  break;
188  }
189 
190  assertTrue(tag > previousTag);
191  previousTag = tag;
192  input.skipField(tag);
193  }
194  }
195 
196  public void testInterleavedFieldsAndExtensions() throws Exception {
197  // Tests that fields are written in order even when extension ranges
198  // are interleaved with field numbers.
199  ByteString data =
200  TestFieldOrderings.newBuilder()
201  .setMyInt(1)
202  .setMyString("foo")
203  .setMyFloat(1.0F)
204  .setExtension(UnittestProto.myExtensionInt, 23)
205  .setExtension(UnittestProto.myExtensionString, "bar")
206  .build().toByteString();
208 
209  Descriptors.Descriptor descriptor = TestFieldOrderings.getDescriptor();
210  ByteString dynamic_data =
211  DynamicMessage.newBuilder(TestFieldOrderings.getDescriptor())
212  .setField(descriptor.findFieldByName("my_int"), 1L)
213  .setField(descriptor.findFieldByName("my_string"), "foo")
214  .setField(descriptor.findFieldByName("my_float"), 1.0F)
215  .setField(UnittestProto.myExtensionInt.getDescriptor(), 23)
216  .setField(UnittestProto.myExtensionString.getDescriptor(), "bar")
217  .build().toByteString();
218  assertFieldsInOrder(dynamic_data);
219  }
220 
223  result.add(UnittestProto.myExtensionInt);
224  result.add(UnittestProto.myExtensionString);
225  return result;
226  }
227 
228  public void testParseMultipleExtensionRanges() throws Exception {
229  // Make sure we can parse a message that contains multiple extensions
230  // ranges.
231  TestFieldOrderings source =
232  TestFieldOrderings.newBuilder()
233  .setMyInt(1)
234  .setMyString("foo")
235  .setMyFloat(1.0F)
236  .setExtension(UnittestProto.myExtensionInt, 23)
237  .setExtension(UnittestProto.myExtensionString, "bar")
238  .build();
239  TestFieldOrderings dest =
240  TestFieldOrderings.parseFrom(source.toByteString(),
242  assertEquals(source, dest);
243  }
244 
245  public void testParseMultipleExtensionRangesDynamic() throws Exception {
246  // Same as above except with DynamicMessage.
247  Descriptors.Descriptor descriptor = TestFieldOrderings.getDescriptor();
248  DynamicMessage source =
249  DynamicMessage.newBuilder(TestFieldOrderings.getDescriptor())
250  .setField(descriptor.findFieldByName("my_int"), 1L)
251  .setField(descriptor.findFieldByName("my_string"), "foo")
252  .setField(descriptor.findFieldByName("my_float"), 1.0F)
253  .setField(UnittestProto.myExtensionInt.getDescriptor(), 23)
254  .setField(UnittestProto.myExtensionString.getDescriptor(), "bar")
255  .build();
259  assertEquals(source, dest);
260  }
261 
262  private static final int UNKNOWN_TYPE_ID = 1550055;
263  private static final int TYPE_ID_1 =
264  TestMessageSetExtension1.getDescriptor().getExtensions().get(0).getNumber();
265  private static final int TYPE_ID_2 =
266  TestMessageSetExtension2.getDescriptor().getExtensions().get(0).getNumber();
267 
268  public void testSerializeMessageSetEagerly() throws Exception {
270  }
271 
272  public void testSerializeMessageSetNotEagerly() throws Exception {
274  }
275 
276  private void testSerializeMessageSetWithFlag(boolean eagerParsing)
277  throws Exception {
279  // Set up a TestMessageSet with two known messages and an unknown one.
280  TestMessageSet messageSet =
281  TestMessageSet.newBuilder()
282  .setExtension(
283  TestMessageSetExtension1.messageSetExtension,
284  TestMessageSetExtension1.newBuilder().setI(123).build())
285  .setExtension(
286  TestMessageSetExtension2.messageSetExtension,
287  TestMessageSetExtension2.newBuilder().setStr("foo").build())
288  .setUnknownFields(
292  .addLengthDelimited(ByteString.copyFromUtf8("bar"))
293  .build())
294  .build())
295  .build();
296 
297  ByteString data = messageSet.toByteString();
298 
299  // Parse back using RawMessageSet and check the contents.
300  RawMessageSet raw = RawMessageSet.parseFrom(data);
301 
302  assertTrue(raw.getUnknownFields().asMap().isEmpty());
303 
304  assertEquals(3, raw.getItemCount());
305  assertEquals(TYPE_ID_1, raw.getItem(0).getTypeId());
306  assertEquals(TYPE_ID_2, raw.getItem(1).getTypeId());
307  assertEquals(UNKNOWN_TYPE_ID, raw.getItem(2).getTypeId());
308 
309  TestMessageSetExtension1 message1 =
310  TestMessageSetExtension1.parseFrom(
311  raw.getItem(0).getMessage().toByteArray());
312  assertEquals(123, message1.getI());
313 
314  TestMessageSetExtension2 message2 =
315  TestMessageSetExtension2.parseFrom(
316  raw.getItem(1).getMessage().toByteArray());
317  assertEquals("foo", message2.getStr());
318 
319  assertEquals("bar", raw.getItem(2).getMessage().toStringUtf8());
320  }
321 
322  public void testParseMessageSetEagerly() throws Exception {
324  }
325 
326  public void testParseMessageSetNotEagerly()throws Exception {
328  }
329 
330  private void testParseMessageSetWithFlag(boolean eagerParsing)
331  throws Exception {
333  ExtensionRegistry extensionRegistry = ExtensionRegistry.newInstance();
334  extensionRegistry.add(TestMessageSetExtension1.messageSetExtension);
335  extensionRegistry.add(TestMessageSetExtension2.messageSetExtension);
336 
337  // Set up a RawMessageSet with two known messages and an unknown one.
338  RawMessageSet raw =
339  RawMessageSet.newBuilder()
340  .addItem(
341  RawMessageSet.Item.newBuilder()
342  .setTypeId(TYPE_ID_1)
343  .setMessage(
344  TestMessageSetExtension1.newBuilder()
345  .setI(123)
346  .build().toByteString())
347  .build())
348  .addItem(
349  RawMessageSet.Item.newBuilder()
350  .setTypeId(TYPE_ID_2)
351  .setMessage(
352  TestMessageSetExtension2.newBuilder()
353  .setStr("foo")
354  .build().toByteString())
355  .build())
356  .addItem(
357  RawMessageSet.Item.newBuilder()
358  .setTypeId(UNKNOWN_TYPE_ID)
359  .setMessage(ByteString.copyFromUtf8("bar"))
360  .build())
361  .build();
362 
363  ByteString data = raw.toByteString();
364 
365  // Parse as a TestMessageSet and check the contents.
366  TestMessageSet messageSet =
367  TestMessageSet.parseFrom(data, extensionRegistry);
368 
369  assertEquals(123, messageSet.getExtension(
370  TestMessageSetExtension1.messageSetExtension).getI());
371  assertEquals("foo", messageSet.getExtension(
372  TestMessageSetExtension2.messageSetExtension).getStr());
373 
374  // Check for unknown field with type LENGTH_DELIMITED,
375  // number UNKNOWN_TYPE_ID, and contents "bar".
376  UnknownFieldSet unknownFields = messageSet.getUnknownFields();
377  assertEquals(1, unknownFields.asMap().size());
378  assertTrue(unknownFields.hasField(UNKNOWN_TYPE_ID));
379 
381  assertEquals(1, field.getLengthDelimitedList().size());
382  assertEquals("bar", field.getLengthDelimitedList().get(0).toStringUtf8());
383  }
384 
385  public void testParseMessageSetExtensionEagerly() throws Exception {
387  }
388 
389  public void testParseMessageSetExtensionNotEagerly() throws Exception {
391  }
392 
393  private void testParseMessageSetExtensionWithFlag(boolean eagerParsing)
394  throws Exception {
396  ExtensionRegistry extensionRegistry = ExtensionRegistry.newInstance();
397  extensionRegistry.add(TestMessageSetExtension1.messageSetExtension);
398 
399  // Set up a RawMessageSet with a known messages.
400  int TYPE_ID_1 =
401  TestMessageSetExtension1
402  .getDescriptor().getExtensions().get(0).getNumber();
403  RawMessageSet raw =
404  RawMessageSet.newBuilder()
405  .addItem(
406  RawMessageSet.Item.newBuilder()
407  .setTypeId(TYPE_ID_1)
408  .setMessage(
409  TestMessageSetExtension1.newBuilder()
410  .setI(123)
411  .build().toByteString())
412  .build())
413  .build();
414 
415  ByteString data = raw.toByteString();
416 
417  // Parse as a TestMessageSet and check the contents.
418  TestMessageSet messageSet =
419  TestMessageSet.parseFrom(data, extensionRegistry);
420  assertEquals(123, messageSet.getExtension(
421  TestMessageSetExtension1.messageSetExtension).getI());
422  }
423 
424  public void testMergeLazyMessageSetExtensionEagerly() throws Exception {
426  }
427 
428  public void testMergeLazyMessageSetExtensionNotEagerly() throws Exception {
430  }
431 
432  private void testMergeLazyMessageSetExtensionWithFlag(boolean eagerParsing)
433  throws Exception {
435  ExtensionRegistry extensionRegistry = ExtensionRegistry.newInstance();
436  extensionRegistry.add(TestMessageSetExtension1.messageSetExtension);
437 
438  // Set up a RawMessageSet with a known messages.
439  int TYPE_ID_1 =
440  TestMessageSetExtension1
441  .getDescriptor().getExtensions().get(0).getNumber();
442  RawMessageSet raw =
443  RawMessageSet.newBuilder()
444  .addItem(
445  RawMessageSet.Item.newBuilder()
446  .setTypeId(TYPE_ID_1)
447  .setMessage(
448  TestMessageSetExtension1.newBuilder()
449  .setI(123)
450  .build().toByteString())
451  .build())
452  .build();
453 
454  ByteString data = raw.toByteString();
455 
456  // Parse as a TestMessageSet and store value into lazy field
457  TestMessageSet messageSet =
458  TestMessageSet.parseFrom(data, extensionRegistry);
459  // Merge lazy field check the contents.
460  messageSet =
461  messageSet.toBuilder().mergeFrom(data, extensionRegistry).build();
462  assertEquals(123, messageSet.getExtension(
463  TestMessageSetExtension1.messageSetExtension).getI());
464  }
465 }
com.google.protobuf.Descriptors
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/Descriptors.java:80
com.google.protobuf.test.WireFormatTest.assertFieldsInOrder
void assertFieldsInOrder(ByteString data)
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:180
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
com.google.protobuf.test.WireFormatTest
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:56
com.google.protobuf.test.WireFormatTest.testParseMultipleExtensionRangesDynamic
void testParseMultipleExtensionRangesDynamic()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:245
com.google.protobuf.test.TestUtil.assertAllFieldsSet
static void assertAllFieldsSet(TestAllTypesOrBuilder message)
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:408
com.google.protobuf.test.WireFormatTest.testMergeLazyMessageSetExtensionNotEagerly
void testMergeLazyMessageSetExtensionNotEagerly()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:428
com.google.protobuf.DynamicMessage.Builder.setField
Builder setField(FieldDescriptor field, Object value)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/DynamicMessage.java:523
com.google.protobuf.test.TestUtil.assertPackedExtensionsSet
static void assertPackedExtensionsSet(TestPackedExtensions message)
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:1814
com.google.protobuf.test.WireFormatTest.getTestFieldOrderingsRegistry
ExtensionRegistry getTestFieldOrderingsRegistry()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:221
com.google.protobuf.ExtensionRegistry.add
void add(final Extension<?, ?> extension)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/ExtensionRegistry.java:218
com.google.protobuf.test.TestUtil.getPackedSet
static TestPackedTypes getPackedSet()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:204
com.google.protobuf.UnknownFieldSet.Field.newBuilder
static Builder newBuilder()
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:716
com.google.protobuf.test.WireFormatTest.testSerializeMessageSetWithFlag
void testSerializeMessageSetWithFlag(boolean eagerParsing)
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:276
com.google.protobuf.UnknownFieldSet.Builder.addField
Builder addField(final int number, final Field field)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:491
com.google.protobuf.AbstractMessage.toByteString
static ByteString toByteString(Object value)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java:171
com.google.protobuf.test.WireFormatTest.testParseMessageSetExtensionEagerly
void testParseMessageSetExtensionEagerly()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:385
com.google.protobuf.test.WireFormatTest.testParseMessageSetWithFlag
void testParseMessageSetWithFlag(boolean eagerParsing)
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:330
com.google.protobuf.test.TestUtil.assertAllExtensionsSet
static void assertAllExtensionsSet(TestAllExtensionsOrBuilder message)
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:1276
com.google.protobuf
Definition: bloaty/third_party/protobuf/benchmarks/java/src/main/java/com/google/protobuf/ProtoCaliperBenchmark.java:2
com.google.protobuf.test.TestUtil
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:162
com.google.protobuf.UnknownFieldSet.Builder.build
UnknownFieldSet build()
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:358
com.google.protobuf.test.WireFormatTest.TYPE_ID_2
static final int TYPE_ID_2
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:265
com.google.protobuf.test.TestUtil.getExtensionRegistry
static ExtensionRegistry getExtensionRegistry()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:1073
com.google.protobuf.CodedOutputStream.flush
abstract void flush()
com.google.protobuf.test.WireFormatTest.testParseMessageSetExtensionWithFlag
void testParseMessageSetExtensionWithFlag(boolean eagerParsing)
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:393
com.google.protobuf.test.WireFormatTest.testExtensionsSerializedSize
void testExtensionsSerializedSize()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:156
message
char * message
Definition: libuv/docs/code/tty-gravity/main.c:12
com.google.protobuf.test.WireFormatTest.testParseMessageSetExtensionNotEagerly
void testParseMessageSetExtensionNotEagerly()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:389
com.google.protobuf.test.TestUtil.getAllExtensionsSet
static TestAllExtensions getAllExtensionsSet()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:198
com.google.protobuf.test.WireFormatTest.testSerializeMessageSetEagerly
void testSerializeMessageSetEagerly()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:268
com.google.protobuf.test.WireFormatTest.TYPE_ID_1
static final int TYPE_ID_1
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:263
com.google.protobuf.UnknownFieldSet.newBuilder
static Builder newBuilder()
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:66
com.google.protobuf.DynamicMessage.newBuilder
static Builder newBuilder(Descriptor type)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/DynamicMessage.java:140
com.google.protobuf.CodedInputStream
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/CodedInputStream.java:61
tag
static void * tag(intptr_t t)
Definition: bad_client.cc:318
com.google.protobuf.test.WireFormatTest.testParseMessageSetNotEagerly
void testParseMessageSetNotEagerly()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:326
com.google.protobuf.test.WireFormatTest.testSerializeExtensions
void testSerializeExtensions()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:79
gmock_output_test.output
output
Definition: bloaty/third_party/googletest/googlemock/test/gmock_output_test.py:175
com.google.protobuf.UnknownFieldSet
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:58
com.google.protobuf.UnknownFieldSet.Field.Builder.build
Field build()
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:931
com.google.protobuf.test.WireFormatTest.testSerializationPacked
void testSerializationPacked()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:68
com.google.protobuf.test.TestUtil.getAllSet
static TestAllTypes getAllSet()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:178
com.google.protobuf.UnknownFieldSet.getField
Field getField(final int number)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:127
com.google.protobuf.test.WireFormatTest.testSerializationPackedWithoutGetSerializedSize
void testSerializationPackedWithoutGetSerializedSize()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:105
com.google.protobuf.test.WireFormatTest.testParseMessageSetEagerly
void testParseMessageSetEagerly()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:322
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
com.google.protobuf.ExtensionRegistryLite
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/ExtensionRegistryLite.java:70
com.google.protobuf.UnknownFieldSet.hasField
boolean hasField(final int number)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:122
F
#define F(b, c, d)
Definition: md4.c:112
tests.qps.qps_worker.dest
dest
Definition: qps_worker.py:45
com.google.protobuf.UnknownFieldSet.Field
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:712
com.google.protobuf.test.WireFormatTest.testSerializePackedExtensions
void testSerializePackedExtensions()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:93
com.google.protobuf.test.WireFormatTest.testSerializeDelimited
void testSerializeDelimited()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:161
com.google.protobuf.test.WireFormatTest.testParseExtensions
void testParseExtensions()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:127
com.google.protobuf.test.WireFormatTest.testParsePackedExtensions
void testParsePackedExtensions()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:143
com.google.protobuf.test.WireFormatTest.testSerializeMessageSetNotEagerly
void testSerializeMessageSetNotEagerly()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:272
com.google.protobuf.UnknownFieldSet.Field.Builder.addLengthDelimited
Builder addLengthDelimited(final ByteString value)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:1035
java
com.google.protobuf.Descriptors.Descriptor
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/Descriptors.java:629
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
com.google.protobuf.DynamicMessage.Builder.build
DynamicMessage build()
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/DynamicMessage.java:395
com.google.protobuf.UnknownFieldSet.asMap
Map< Integer, Field > asMap()
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java:117
com.google.protobuf.ExtensionRegistryLite.setEagerlyParseMessageSets
static void setEagerlyParseMessageSets(boolean isEagerlyParse)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/ExtensionRegistryLite.java:103
com.google.protobuf.test.WireFormatTest.testInterleavedFieldsAndExtensions
void testInterleavedFieldsAndExtensions()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:196
protobuf_unittest
Definition: bloaty/third_party/protobuf/src/google/protobuf/map_test_util_impl.h:39
com.google.protobuf.ExtensionRegistry.newInstance
static ExtensionRegistry newInstance()
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/ExtensionRegistry.java:93
com.google.protobuf.test.WireFormatTest.testMergeLazyMessageSetExtensionWithFlag
void testMergeLazyMessageSetExtensionWithFlag(boolean eagerParsing)
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:432
L
lua_State * L
Definition: upb/upb/bindings/lua/main.c:35
com.google.protobuf.DynamicMessage
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/DynamicMessage.java:51
com.google.protobuf.test.WireFormatTest.UNKNOWN_TYPE_ID
static final int UNKNOWN_TYPE_ID
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:262
com.google
com.google.protobuf.test.TestUtil.getPackedExtensionsSet
static TestPackedExtensions getPackedExtensionsSet()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:216
com
com.google.protobuf.CodedOutputStream.newInstance
static CodedOutputStream newInstance(final OutputStream output)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java:92
com.google.protobuf.ExtensionRegistry
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/ExtensionRegistry.java:91
input
std::string input
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc:197
com.google.protobuf.DynamicMessage.parseFrom
static DynamicMessage parseFrom(Descriptor type, CodedInputStream input)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/DynamicMessage.java:90
com.google.protobuf.CodedOutputStream
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java:59
com.google.protobuf.test.TestUtil.assertPackedFieldsSet
static void assertPackedFieldsSet(TestPackedTypes message)
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java:938
testing::TestCase
TestSuite TestCase
Definition: googletest/googletest/include/gtest/gtest.h:203
com.google.protobuf.test.WireFormatTest.testMergeLazyMessageSetExtensionEagerly
void testMergeLazyMessageSetExtensionEagerly()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:424
com.google.protobuf.test.WireFormatTest.testSerialization
void testSerialization()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:57
com.google.protobuf.ByteString.size
abstract int size()
descriptor
static const char descriptor[1336]
Definition: certs.upbdefs.c:16
TestCase
com.google.protobuf.test.WireFormatTest.testParseMultipleExtensionRanges
void testParseMultipleExtensionRanges()
Definition: bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/WireFormatTest.java:228
com.google.protobuf.ByteString
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/ByteString.java:67


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:54