Home
last modified time | relevance | path

Searched refs:getDefaultInstance (Results 1 – 25 of 68) sorted by relevance

123

/third_party/protobuf/java/lite/src/test/java/com/google/protobuf/
DLiteTest.java313 assertEquals(ForeignMessageLite.getDefaultInstance(), message.getOptionalForeignMessage()); in testSanityCopyOnWrite()
317 assertEquals(ForeignMessageLite.getDefaultInstance(), message.getOptionalForeignMessage()); in testSanityCopyOnWrite()
319 assertEquals(ForeignMessageLite.getDefaultInstance(), builder.getOptionalForeignMessage()); in testSanityCopyOnWrite()
325 assertEquals(ForeignMessageLite.getDefaultInstance(), message.getOptionalForeignMessage()); in testSanityCopyOnWrite()
329 assertEquals(ForeignMessageLite.getDefaultInstance(), message.getOptionalForeignMessage()); in testSanityCopyOnWrite()
331 assertEquals(ForeignMessageLite.getDefaultInstance(), builder.getOptionalForeignMessage()); in testSanityCopyOnWrite()
337 assertEquals(OptionalGroup.getDefaultInstance(), message.getOptionalGroup()); in testSanityCopyOnWrite()
341 assertEquals(OptionalGroup.getDefaultInstance(), message.getOptionalGroup()); in testSanityCopyOnWrite()
343 assertEquals(OptionalGroup.getDefaultInstance(), builder.getOptionalGroup()); in testSanityCopyOnWrite()
349 assertEquals(OptionalGroup.getDefaultInstance(), message.getOptionalGroup()); in testSanityCopyOnWrite()
[all …]
/third_party/protobuf/java/core/src/test/java/com/google/protobuf/
DLazyFieldLiteTest.java50 assertEquals(message, lazyField.getValue(TestAllTypes.getDefaultInstance())); in testGetValue()
52 assertNotEqual(message, lazyField.getValue(TestAllTypes.getDefaultInstance())); in testGetValue()
58 assertEquals(message, lazyField.getValue(TestAllExtensions.getDefaultInstance())); in testGetValueEx()
60 assertNotEqual(message, lazyField.getValue(TestAllExtensions.getDefaultInstance())); in testGetValueEx()
67 assertNotEqual(message, lazyField.getValue(TestAllTypes.getDefaultInstance())); in testSetValue()
68 message = lazyField.getValue(TestAllTypes.getDefaultInstance()); in testSetValue()
70 assertEquals(message, lazyField.getValue(TestAllTypes.getDefaultInstance())); in testSetValue()
77 assertNotEqual(message, lazyField.getValue(TestAllExtensions.getDefaultInstance())); in testSetValueEx()
78 MessageLite value = lazyField.getValue(TestAllExtensions.getDefaultInstance()); in testSetValueEx()
80 assertEquals(value, lazyField.getValue(TestAllExtensions.getDefaultInstance())); in testSetValueEx()
[all …]
DSingleFieldBuilderV3Test.java49 TestAllTypes.getDefaultInstance(), mockParent, false); in testBasicUseAndInvalidations()
50 assertSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); in testBasicUseAndInvalidations()
51 assertEquals(TestAllTypes.getDefaultInstance(), builder.getBuilder().buildPartial()); in testBasicUseAndInvalidations()
73 TestAllTypes.getDefaultInstance(), mockParent, false); in testSetMessage()
95 TestAllTypes.getDefaultInstance(), mockParent, false); in testClear()
97 assertNotSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); in testClear()
99 assertSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); in testClear()
102 assertNotSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); in testClear()
104 assertSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); in testClear()
111 TestAllTypes.getDefaultInstance(), mockParent, false); in testMerge()
[all …]
DFieldPresenceTest.java87 assertFalse(TestAllTypes.getDefaultInstance().hasOptionalNestedMessage()); in testHasMethod()
94 assertFalse(TestAllTypes.getDefaultInstance().hasOneofNestedMessage()); in testHasMethod()
106 assertFalse(TestProto3Optional.getDefaultInstance().hasOptionalInt32()); in testHasMethodForProto3Optional()
107 assertFalse(TestProto3Optional.getDefaultInstance().hasOptionalInt64()); in testHasMethodForProto3Optional()
108 assertFalse(TestProto3Optional.getDefaultInstance().hasOptionalUint32()); in testHasMethodForProto3Optional()
109 assertFalse(TestProto3Optional.getDefaultInstance().hasOptionalUint64()); in testHasMethodForProto3Optional()
110 assertFalse(TestProto3Optional.getDefaultInstance().hasOptionalSint32()); in testHasMethodForProto3Optional()
111 assertFalse(TestProto3Optional.getDefaultInstance().hasOptionalSint64()); in testHasMethodForProto3Optional()
112 assertFalse(TestProto3Optional.getDefaultInstance().hasOptionalFixed32()); in testHasMethodForProto3Optional()
113 assertFalse(TestProto3Optional.getDefaultInstance().hasOptionalFixed64()); in testHasMethodForProto3Optional()
[all …]
DTestBadIdentifiers.java52 TestBadIdentifiersProto.Descriptor.getDefaultInstance().getDescriptor(); in testGetDescriptor()
53 TestBadIdentifiersProto.Descriptor.getDefaultInstance().getDescriptorForType(); in testGetDescriptor()
54 TestBadIdentifiersProto.Descriptor.NestedDescriptor.getDefaultInstance().getDescriptor(); in testGetDescriptor()
55 TestBadIdentifiersProto.Descriptor.NestedDescriptor.getDefaultInstance().getDescriptorForType(); in testGetDescriptor()
60 TestBadIdentifiersProto.TestConflictingFieldNames.getDefaultInstance(); in testConflictingFieldNames()
104 TestBadIdentifiersProto.TestLeadingNumberFields.getDefaultInstance(); in testNumberFields()
DDiscardUnknownFieldsTest.java46 testProto2Message(UnittestProto.TestEmptyMessage.getDefaultInstance()); in testProto2()
47 testProto2Message(UnittestProto.TestEmptyMessageWithExtensions.getDefaultInstance()); in testProto2()
49 DynamicMessage.getDefaultInstance(UnittestProto.TestEmptyMessage.getDescriptor())); in testProto2()
51 DynamicMessage.getDefaultInstance( in testProto2()
57 testProto3Message(UnittestProto3.TestEmptyMessage.getDefaultInstance()); in testProto3()
59 DynamicMessage.getDefaultInstance(UnittestProto3.TestEmptyMessage.getDescriptor())); in testProto3()
DServiceTest.java105 assertSame(mockService.getRequestPrototype(fooDescriptor), FooRequest.getDefaultInstance()); in testGetPrototype()
106 assertSame(mockService.getResponsePrototype(fooDescriptor), FooResponse.getDefaultInstance()); in testGetPrototype()
107 assertSame(mockService.getRequestPrototype(barDescriptor), BarRequest.getDefaultInstance()); in testGetPrototype()
108 assertSame(mockService.getResponsePrototype(barDescriptor), BarResponse.getDefaultInstance()); in testGetPrototype()
124 EasyMock.same(FooResponse.getDefaultInstance()), in testStub()
130 EasyMock.same(BarResponse.getDefaultInstance()), in testStub()
154 EasyMock.same(FooResponse.getDefaultInstance()))) in testBlockingStub()
161 EasyMock.same(BarResponse.getDefaultInstance()))) in testBlockingStub()
176 MessageWithNoOuter request = MessageWithNoOuter.getDefaultInstance(); in testNewReflectiveService()
204 MessageWithNoOuter request = MessageWithNoOuter.getDefaultInstance(); in testNewReflectiveBlockingService()
[all …]
DMessageTest.java54 .setOptionalForeignMessage(ForeignMessage.getDefaultInstance())
117 private static final TestRequired TEST_REQUIRED_UNINITIALIZED = TestRequired.getDefaultInstance();
338 .setOptionalForeignMessage(ForeignMessage.getDefaultInstance()) in testDynamicRepeatedMessageNotNull()
340 .addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()) in testDynamicRepeatedMessageNotNull()
341 .addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()) in testDynamicRepeatedMessageNotNull()
DWireFormatLiteTest.java543 assertInvalidWireFormat(TestAllTypes.getDefaultInstance(), data); in assertInvalidWireFormat()
544 assertInvalidWireFormat(UnittestProto3.TestAllTypes.getDefaultInstance(), data); in assertInvalidWireFormat()
585 assertInvalidWireFormat(TestMessageSet.getDefaultInstance(), data); in testParserRejectInvalidTag()
601 assertInvalidWireFormat(TestMessageSet.getDefaultInstance(), data); in testParserRejectInvalidTag()
608 assertInvalidWireFormat(TestMap.getDefaultInstance(), data); in testParserRejectInvalidTag()
630 assertInvalidWireFormat(TestMessageSet.getDefaultInstance(), data); in testUnmatchedGroupTag()
657 assertAccepted(TestAllTypes.getDefaultInstance(), data); in testUnmatchedWireType()
658 assertAccepted(UnittestProto3.TestAllTypes.getDefaultInstance(), data); in testUnmatchedWireType()
659 assertAccepted(TestMap.getDefaultInstance(), data); in testUnmatchedWireType()
660 assertAccepted(MapForProto2TestProto.TestMap.getDefaultInstance(), data); in testUnmatchedWireType()
[all …]
DGeneratedMessageTest.java244 TestAllTypes.getDefaultInstance(), in testDefaultInstance()
245 TestAllTypes.getDefaultInstance().getDefaultInstanceForType()); in testDefaultInstance()
247 TestAllTypes.getDefaultInstance(), TestAllTypes.newBuilder().getDefaultInstanceForType()); in testDefaultInstance()
308 builder.addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()); in testProtosShareRepeatedArraysIfDidntChange()
321 builder.addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()); in testRepeatedArraysAreImmutable()
610 TestUtil.assertClear(TestAllTypes.getDefaultInstance()); in testDefaults()
613 TestExtremeDefaultValues message = TestExtremeDefaultValues.getDefaultInstance(); in testDefaults()
671 reflectionTester.assertClearViaReflection(TestAllTypes.getDefaultInstance()); in testReflectionDefaults()
701 TestAllTypes.getDefaultInstance().getDefaultNestedEnum() instanceof ProtocolMessageEnum); in testEnumInterface()
772 TestUtil.assertExtensionsClear(TestAllExtensions.getDefaultInstance()); in testExtensionDefaults()
[all …]
DCheckUtf8Test.java94 assertParseBadUtf8(StringWrapper.getDefaultInstance(), serialized); in testParseRequiredStringWithBadUtf8()
127 assertParseBadUtf8(StringWrapperSize.getDefaultInstance(), serialized); in testParseRequiredStringWithBadUtf8Size()
DMapForProto2Test.java301 testMapOrBuilder.getInt32ToMessageField(), 1, MessageValue.getDefaultInstance()); in assertMapsAreImmutable()
360 messageMap.put(1, TestMap.MessageValue.getDefaultInstance()); in testMutableMapLifecycle()
361 assertEquals(newMap(1, TestMap.MessageValue.getDefaultInstance()), in testMutableMapLifecycle()
364 messageMap.put(2, TestMap.MessageValue.getDefaultInstance()); in testMutableMapLifecycle()
369 assertEquals(newMap(1, TestMap.MessageValue.getDefaultInstance()), in testMutableMapLifecycle()
371 builder.getMutableInt32ToMessageField().put(2, TestMap.MessageValue.getDefaultInstance()); in testMutableMapLifecycle()
373 newMap(1, TestMap.MessageValue.getDefaultInstance(), in testMutableMapLifecycle()
374 2, TestMap.MessageValue.getDefaultInstance()), in testMutableMapLifecycle()
783 Message dynamicDefaultInstance = DynamicMessage.getDefaultInstance(TestMap.getDescriptor()); in testDynamicMessage()
796 Message dynamicDefaultInstance = DynamicMessage.getDefaultInstance(TestMap.getDescriptor()); in testDynamicMessageUnsetKeyAndValue()
[all …]
DMapForProto2LiteTest.java234 testMapOrBuilder.getInt32ToMessageField(), 1, MessageValue.getDefaultInstance()); in assertMapsAreImmutable()
275 builder.putInt32ToMessageField(1, TestMap.MessageValue.getDefaultInstance()); in testMutableMapLifecycle()
277 newMap(1, TestMap.MessageValue.getDefaultInstance()), in testMutableMapLifecycle()
280 newMap(1, TestMap.MessageValue.getDefaultInstance()), builder.getInt32ToMessageField()); in testMutableMapLifecycle()
281 builder.putInt32ToMessageField(2, TestMap.MessageValue.getDefaultInstance()); in testMutableMapLifecycle()
285 TestMap.MessageValue.getDefaultInstance(), in testMutableMapLifecycle()
287 TestMap.MessageValue.getDefaultInstance()), in testMutableMapLifecycle()
/third_party/protobuf/benchmarks/java/src/main/java/com/google/protobuf/
DProtoCaliperBenchmark.java37 Message getDefaultInstance() { in getDefaultInstance() method
39 .getDefaultInstance(); in getDefaultInstance()
45 Message getDefaultInstance() { in getDefaultInstance() method
47 .getDefaultInstance(); in getDefaultInstance()
53 Message getDefaultInstance() { in getDefaultInstance() method
54 return com.google.protobuf.benchmarks.BenchmarkMessage2.GoogleMessage2.getDefaultInstance(); in getDefaultInstance()
73 Message getDefaultInstance() { in getDefaultInstance() method
74 return com.google.protobuf.benchmarks.BenchmarkMessage3.GoogleMessage3.getDefaultInstance(); in getDefaultInstance()
88 Message getDefaultInstance() { in getDefaultInstance() method
89 return com.google.protobuf.benchmarks.BenchmarkMessage4.GoogleMessage4.getDefaultInstance(); in getDefaultInstance()
[all …]
/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/
DTestBadIdentifiers.java55 .getDefaultInstance().getDescriptor(); in testGetDescriptor()
57 .getDefaultInstance().getDescriptorForType(); in testGetDescriptor()
59 .NestedDescriptor.getDefaultInstance().getDescriptor(); in testGetDescriptor()
61 .Descriptor.NestedDescriptor.getDefaultInstance() in testGetDescriptor()
DServiceTest.java104 FooRequest.getDefaultInstance()); in testGetPrototype()
106 FooResponse.getDefaultInstance()); in testGetPrototype()
108 BarRequest.getDefaultInstance()); in testGetPrototype()
110 BarResponse.getDefaultInstance()); in testGetPrototype()
126 EasyMock.same(FooResponse.getDefaultInstance()), in testStub()
132 EasyMock.same(BarResponse.getDefaultInstance()), in testStub()
157 EasyMock.same(FooResponse.getDefaultInstance()))).andReturn(fooResponse); in testBlockingStub()
162 EasyMock.same(BarResponse.getDefaultInstance()))).andReturn(barResponse); in testBlockingStub()
178 MessageWithNoOuter request = MessageWithNoOuter.getDefaultInstance(); in testNewReflectiveService()
208 MessageWithNoOuter request = MessageWithNoOuter.getDefaultInstance(); in testNewReflectiveBlockingService()
[all …]
DMessageTest.java58 .setOptionalForeignMessage(ForeignMessage.getDefaultInstance())
116 TestRequired.getDefaultInstance();
338 .setOptionalForeignMessage(ForeignMessage.getDefaultInstance()) in testDynamicRepeatedMessageNotNull()
340 .addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()) in testDynamicRepeatedMessageNotNull()
341 .addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()) in testDynamicRepeatedMessageNotNull()
DGeneratedMessageTest.java81 assertSame(TestAllTypes.getDefaultInstance(), in testDefaultInstance()
82 TestAllTypes.getDefaultInstance().getDefaultInstanceForType()); in testDefaultInstance()
83 assertSame(TestAllTypes.getDefaultInstance(), in testDefaultInstance()
152 builder.addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()); in testRepeatedArraysAreImmutable()
411 TestUtil.assertClear(TestAllTypes.getDefaultInstance()); in testDefaults()
415 TestExtremeDefaultValues.getDefaultInstance(); in testDefaults()
474 TestAllTypes.getDefaultInstance()); in testReflectionDefaults()
480 assertTrue(TestAllTypes.getDefaultInstance().getDefaultNestedEnum() in testEnumInterface()
531 TestUtil.assertExtensionsClear(TestAllExtensions.getDefaultInstance()); in testExtensionDefaults()
577 TestAllExtensions.getDefaultInstance()); in testExtensionReflectionDefaults()
[all …]
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/
DDynamicMessage.java78 public static DynamicMessage getDefaultInstance(Descriptor type) { in getDefaultInstance() method in DynamicMessage
85 UnknownFieldSet.getDefaultInstance()); in getDefaultInstance()
162 return getDefaultInstance(type); in getDefaultInstanceForType()
200 result = getDefaultInstance(field.getMessageType()); in getField()
329 this.unknownFields = UnknownFieldSet.getDefaultInstance();
340 fields.setField(field, getDefaultInstance(field.getMessageType()));
361 unknownFields = UnknownFieldSet.getDefaultInstance();
454 return getDefaultInstance(type);
514 result = getDefaultInstance(field.getMessageType());
DManifestSchemaFactory.java63 messageInfo.getDefaultInstance()); in createSchema()
68 messageInfo.getDefaultInstance()); in createSchema()
DUnknownFieldSetLiteSchema.java97 if (unknownFields == UnknownFieldSetLite.getDefaultInstance()) { in getBuilderFromMessage()
126 return other.equals(UnknownFieldSetLite.getDefaultInstance()) in merge()
DMessageInfo.java42 MessageLite getDefaultInstance(); in getDefaultInstance() method
DUnknownFieldSet.java80 public static UnknownFieldSet getDefaultInstance() { in getDefaultInstance() method in UnknownFieldSet
123 return (result == null) ? Field.getDefaultInstance() : result; in getField()
337 result = getDefaultInstance(); in build()
367 return UnknownFieldSet.getDefaultInstance(); in getDefaultInstanceForType()
397 if (other != getDefaultInstance()) { in mergeFrom()
696 public static Field getDefaultInstance() { in getDefaultInstance() method in UnknownFieldSet.Field
/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/
DFieldMaskUtil.java107 return fromStringList(Internal.getDefaultInstance(type).getDescriptorForType(), paths); in fromStringList()
159 Descriptor descriptor = Internal.getDefaultInstance(type).getDescriptorForType(); in fromFieldNumbers()
207 Descriptor descriptor = Internal.getDefaultInstance(type).getDescriptorForType(); in isValid()
228 Descriptor descriptor = Internal.getDefaultInstance(type).getDescriptorForType(); in isValid()
/third_party/protobuf/ruby/src/main/java/com/google/protobuf/jruby/
DSentinelOuterClass.java123 return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); in getUnknownFields()
397 return com.google.protobuf.jruby.SentinelOuterClass.Sentinel.getDefaultInstance(); in getDefaultInstanceForType()
580 defaultString_ = getDefaultInstance().getDefaultString(); in clearDefaultString()
700 defaultBytes_ = getDefaultInstance().getDefaultBytes(); in clearDefaultBytes()
723 public static com.google.protobuf.jruby.SentinelOuterClass.Sentinel getDefaultInstance() { in getDefaultInstance() method in SentinelOuterClass.Sentinel

123