/external/protobuf/java/src/test/java/com/google/protobuf/ |
D | TextFormatTest.java | 123 TextFormat.Parser.newBuilder() 129 TextFormat.Parser.newBuilder().build(); 169 return UnknownFieldSet.newBuilder() in makeUnknownFieldSet() 171 UnknownFieldSet.Field.newBuilder() in makeUnknownFieldSet() 177 UnknownFieldSet.newBuilder() in makeUnknownFieldSet() 179 UnknownFieldSet.Field.newBuilder() in makeUnknownFieldSet() 185 UnknownFieldSet.Field.newBuilder() in makeUnknownFieldSet() 191 UnknownFieldSet.Field.newBuilder() in makeUnknownFieldSet() 203 TestEmptyMessage.newBuilder() in testPrintUnknownFields() 233 final Object value = NestedMessage.newBuilder().setBb(42).build(); in testPrintField() [all …]
|
D | DynamicMessageTest.java | 63 DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); in testDynamicMessageAccessors() 71 DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); in testSettersAfterBuild() 91 DynamicMessage.newBuilder(TestEmptyMessage.getDescriptor()); in testUnknownFields() 92 builder.setUnknownFields(UnknownFieldSet.newBuilder() in testUnknownFields() 93 .addField(1, UnknownFieldSet.Field.newBuilder().addVarint(1).build()) in testUnknownFields() 94 .addField(2, UnknownFieldSet.Field.newBuilder().addFixed32(1).build()) in testUnknownFields() 99 Message.Builder newBuilder = builder.clone(); in testUnknownFields() local 100 assertEquals(2, newBuilder.getUnknownFields().asMap().size()); in testUnknownFields() 102 newBuilder.clear(); in testUnknownFields() 103 assertTrue(newBuilder.getUnknownFields().asMap().isEmpty()); in testUnknownFields() [all …]
|
D | MessageTest.java | 54 TestAllTypes.newBuilder() 62 TestAllTypes.newBuilder() 65 .setOptionalForeignMessage(ForeignMessage.newBuilder().setC(3).build()) 81 TestAllTypes.newBuilder(MERGE_DEST) in testMergeFrom() 94 TestAllTypes.newBuilder(MERGE_DEST) in testMergeFromDynamic() 95 .mergeFrom(DynamicMessage.newBuilder(MERGE_SOURCE).build()) in testMergeFromDynamic() 104 DynamicMessage.newBuilder(MERGE_DEST) in testDynamicMergeFrom() 105 .mergeFrom(DynamicMessage.newBuilder(MERGE_SOURCE).build()) in testDynamicMergeFrom() 117 TestRequired.newBuilder().setA(1).setB(2).setC(3).build(); 120 TestRequired.Builder builder = TestRequired.newBuilder(); in testRequired() [all …]
|
D | LazyMessageLiteTest.java | 67 LazyNestedInnerMessageLite nested = LazyNestedInnerMessageLite.newBuilder() in testSetValues() 70 LazyInnerMessageLite inner = LazyInnerMessageLite.newBuilder() in testSetValues() 74 LazyMessageLite outer = LazyMessageLite.newBuilder() in testSetValues() 100 LazyMessageLite outer = LazyMessageLite.newBuilder() in testSetRepeatedValues() 102 .addRepeatedInner(LazyInnerMessageLite.newBuilder().setNum(119)) in testSetRepeatedValues() 103 .addRepeatedInner(LazyInnerMessageLite.newBuilder().setNum(122)) in testSetRepeatedValues() 116 LazyInnerMessageLite inner = LazyInnerMessageLite.newBuilder() in testAddAll() 122 LazyMessageLite outer = LazyMessageLite.newBuilder() in testAddAll() 132 LazyMessageLite outer = LazyMessageLite.newBuilder() in testGetDefaultValues() 153 LazyInnerMessageLite inner = LazyInnerMessageLite.newBuilder() in testClearValues() [all …]
|
D | GeneratedMessageTest.java | 93 TestAllTypes.newBuilder().getDefaultInstanceForType()); in testDefaultInstance() 97 TestAllTypes.Builder builder = TestAllTypes.newBuilder(); in testMessageOrBuilder() 104 TestAllTypes.Builder builder = TestAllTypes.newBuilder(); in testUsingBuilderMultipleTimes() 112 builder.setOptionalForeignMessage(ForeignMessage.newBuilder().setC(1)); in testUsingBuilderMultipleTimes() 113 builder.addRepeatedForeignMessage(ForeignMessage.newBuilder().setC(1)); in testUsingBuilderMultipleTimes() 131 builder.setOptionalForeignMessage(ForeignMessage.newBuilder().setC(2)); in testUsingBuilderMultipleTimes() 132 builder.setRepeatedForeignMessage(0, ForeignMessage.newBuilder().setC(2)); in testUsingBuilderMultipleTimes() 158 TestAllTypes.Builder builder = TestAllTypes.newBuilder(); in testProtosShareRepeatedArraysIfDidntChange() 174 TestAllTypes.Builder builder = TestAllTypes.newBuilder(); in testRepeatedArraysAreImmutable() 232 TestAllTypes.Builder builder = TestAllTypes.newBuilder(); in testSettersRejectNull() [all …]
|
D | UnknownFieldSetTest.java | 71 UnknownFieldSet.Builder bizarroFields = UnknownFieldSet.newBuilder(); in getBizarroData() 74 UnknownFieldSet.Field.newBuilder().addVarint(1).build(); in getBizarroData() 76 UnknownFieldSet.Field.newBuilder().addFixed32(1).build(); in getBizarroData() 159 TestEmptyMessage.newBuilder().mergeFrom(emptyMessage).build(); in testCopyFrom() 166 TestEmptyMessage.newBuilder() in testMergeFrom() 168 UnknownFieldSet.newBuilder() in testMergeFrom() 170 UnknownFieldSet.Field.newBuilder() in testMergeFrom() 173 UnknownFieldSet.Field.newBuilder() in testMergeFrom() 178 TestEmptyMessage.newBuilder() in testMergeFrom() 180 UnknownFieldSet.newBuilder() in testMergeFrom() [all …]
|
D | LiteEqualsAndHashTest.java | 59 Foo foo1a = Foo.newBuilder() in testEquals() 61 .addBar(Bar.newBuilder().setName("foo1")) in testEquals() 63 Foo foo1b = Foo.newBuilder() in testEquals() 65 .addBar(Bar.newBuilder().setName("foo1")) in testEquals() 67 Foo foo2 = Foo.newBuilder() in testEquals() 69 .addBar(Bar.newBuilder().setName("foo2")) in testEquals() 81 Bar bar = Bar.newBuilder().setName("bar").build(); in testEquals() 82 BarPrime barPrime = BarPrime.newBuilder().setName("bar").build(); in testEquals()
|
D | CheckUtf8Test.java | 55 StringWrapper.newBuilder().setReqBytes(UTF8_BYTE_STRING).getReq()); in testBuildRequiredStringWithGoodUtf8() 60 BytesWrapper.newBuilder().setReq(UTF8_BYTE_STRING).build().toByteString(); in testParseRequiredStringWithGoodUtf8() 67 StringWrapper.newBuilder().setReqBytes(NON_UTF8_BYTE_STRING); in testBuildRequiredStringWithBadUtf8() 76 StringWrapper.newBuilder().setOptBytes(NON_UTF8_BYTE_STRING); in testBuildOptionalStringWithBadUtf8() 85 StringWrapper.newBuilder().addRepBytes(NON_UTF8_BYTE_STRING); in testBuildRepeatedStringWithBadUtf8() 94 BytesWrapper.newBuilder().setReq(NON_UTF8_BYTE_STRING).build().toByteString(); in testParseRequiredStringWithBadUtf8() 105 StringWrapperSize.newBuilder().setReqBytes(NON_UTF8_BYTE_STRING); in testBuildRequiredStringWithBadUtf8Size() 114 StringWrapperSize.newBuilder().setOptBytes(NON_UTF8_BYTE_STRING); in testBuildOptionalStringWithBadUtf8Size() 123 StringWrapperSize.newBuilder().addRepBytes(NON_UTF8_BYTE_STRING); in testBuildRepeatedStringWithBadUtf8Size() 132 BytesWrapperSize.newBuilder().setReq(NON_UTF8_BYTE_STRING).build().toByteString(); in testParseRequiredStringWithBadUtf8Size()
|
D | NestedBuildersTest.java | 50 Vehicle.Builder vehicleBuilder = Vehicle.newBuilder(); in testMessagesAndBuilders() 93 Vehicle.Builder vehicleBuilder = Vehicle.newBuilder(); in testMessagesAreCached() 136 Vehicle.Builder vehicleBuilder = Vehicle.newBuilder(); in testRemove_WithNestedBuilders() 150 Vehicle.Builder vehicleBuilder = Vehicle.newBuilder(); in testRemove_WithNestedMessages() 151 vehicleBuilder.addWheel(Wheel.newBuilder() in testRemove_WithNestedMessages() 154 vehicleBuilder.addWheel(Wheel.newBuilder() in testRemove_WithNestedMessages() 164 Vehicle vehicle1 = Vehicle.newBuilder() in testMerge() 165 .addWheel(Wheel.newBuilder().setRadius(1).build()) in testMerge() 166 .addWheel(Wheel.newBuilder().setRadius(2).build()) in testMerge() 169 Vehicle vehicle2 = Vehicle.newBuilder() in testMerge() [all …]
|
D | WireFormatTest.java | 266 TestFieldOrderings.newBuilder() in testInterleavedFieldsAndExtensions() 277 DynamicMessage.newBuilder(TestFieldOrderings.getDescriptor()) in testInterleavedFieldsAndExtensions() 298 TestFieldOrderings.newBuilder() in testParseMultipleExtensionRanges() 315 DynamicMessage.newBuilder(TestFieldOrderings.getDescriptor()) in testParseMultipleExtensionRangesDynamic() 347 TestMessageSet.newBuilder() in testSerializeMessageSetWithFlag() 350 TestMessageSetExtension1.newBuilder().setI(123).build()) in testSerializeMessageSetWithFlag() 353 TestMessageSetExtension2.newBuilder().setStr("foo").build()) in testSerializeMessageSetWithFlag() 355 UnknownFieldSet.newBuilder() in testSerializeMessageSetWithFlag() 357 UnknownFieldSet.Field.newBuilder() in testSerializeMessageSetWithFlag() 405 RawMessageSet.newBuilder() in testParseMessageSetWithFlag() [all …]
|
D | AbstractMessageTest.java | 193 TestAllTypes.newBuilder(TestUtil.getAllSet())) in testClear() 200 new AbstractMessageWrapper.Builder(TestAllTypes.newBuilder()) in testCopy() 225 new AbstractMessageWrapper.Builder(TestAllTypes.newBuilder()); in testParsing() 232 TestRequiredForeign.Builder builder = TestRequiredForeign.newBuilder(); in testParsingUninitialized() 236 new AbstractMessageWrapper.Builder(TestRequiredForeign.newBuilder()); in testParsingUninitialized() 247 Message.Builder dynamicMessageBuilder = DynamicMessage.newBuilder( in testParsingUninitialized() 272 new AbstractMessageWrapper.Builder(TestPackedTypes.newBuilder()); in testPackedParsing() 291 new AbstractMessageWrapper.Builder(TestUnpackedTypes.newBuilder()); in testParsePackedToUnpacked() 300 new AbstractMessageWrapper.Builder(TestPackedTypes.newBuilder()); in testParseUnpackedToPacked() 308 new AbstractMessageWrapper.Builder(TestUnpackedTypes.newBuilder()); in testUnpackedParsing() [all …]
|
D | ParserTest.java | 129 TestRequired.newBuilder().setA(1).buildPartial()); in testParsePartial() 228 TestOptimizedForSize.Builder builder = TestOptimizedForSize.newBuilder(); in testOptimizeForSize() 229 builder.setI(12).setMsg(ForeignMessage.newBuilder().setC(34).build()); in testOptimizeForSize() 232 TestRequiredOptimizedForSize.newBuilder().setX(78).build()); in testOptimizeForSize() 259 TestAllTypes.Builder builder = TestAllTypes.newBuilder(); in testParsingMerge() 269 TestParsingMerge.RepeatedFieldsGenerator.Group1.newBuilder() in testParsingMerge() 272 TestParsingMerge.RepeatedFieldsGenerator.Group1.newBuilder() in testParsingMerge() 275 TestParsingMerge.RepeatedFieldsGenerator.Group1.newBuilder() in testParsingMerge() 278 TestParsingMerge.RepeatedFieldsGenerator.Group2.newBuilder() in testParsingMerge() 281 TestParsingMerge.RepeatedFieldsGenerator.Group2.newBuilder() in testParsingMerge() [all …]
|
D | DescriptorsTest.java | 445 FileDescriptorProto fileDescriptorProto = FileDescriptorProto.newBuilder() in testDescriptorValidatorException() 447 .addMessageType(DescriptorProto.newBuilder() in testDescriptorValidatorException() 449 .addField(FieldDescriptorProto.newBuilder() in testDescriptorValidatorException() 477 FileDescriptorProto fileDescriptorProto = FileDescriptorProto.newBuilder() in testDescriptorComplexCrosslink() 479 .addMessageType(DescriptorProto.newBuilder() in testDescriptorComplexCrosslink() 481 .addField(FieldDescriptorProto.newBuilder() in testDescriptorComplexCrosslink() 488 .addMessageType(DescriptorProto.newBuilder() in testDescriptorComplexCrosslink() 490 .addField(FieldDescriptorProto.newBuilder() in testDescriptorComplexCrosslink() 523 FileDescriptorProto fooProto = FileDescriptorProto.newBuilder() in testDependencyOrder() 525 FileDescriptorProto barProto = FileDescriptorProto.newBuilder() in testDependencyOrder() [all …]
|
D | RepeatedFieldBuilderTest.java | 54 builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build()); in testBasicUse() 55 builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build()); in testBasicUse() 75 builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build()); in testGoingBackAndForth() 76 builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build()); in testGoingBackAndForth() 104 builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build()); in testVariousMethods() 105 builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(2).build()); in testVariousMethods() 146 builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build()); in testLists() 148 TestAllTypes.newBuilder().setOptionalInt32(0).build()); in testLists() 165 builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(12).build()); in testLists()
|
D | LiteTest.java | 71 TestAllTypesLite.newBuilder() in testLite() 75 TestAllTypesLite.NestedMessage.newBuilder().setBb(7)) in testLite() 94 TestAllExtensionsLite.newBuilder() in testLiteExtensions() 100 TestAllTypesLite.NestedMessage.newBuilder().setBb(7).build()) in testLiteExtensions() 125 TestAllTypesLite.newBuilder() in testSerialize() 129 TestAllTypesLite.NestedMessage.newBuilder().setBb(7)) in testSerialize()
|
D | ServiceTest.java | 79 FooRequest fooRequest = FooRequest.newBuilder().build(); in testCallMethod() 80 BarRequest barRequest = BarRequest.newBuilder().build(); in testCallMethod() 114 FooRequest fooRequest = FooRequest.newBuilder().build(); in testStub() 115 BarRequest barRequest = BarRequest.newBuilder().build(); in testStub() 142 FooRequest fooRequest = FooRequest.newBuilder().build(); in testBlockingStub() 143 BarRequest barRequest = BarRequest.newBuilder().build(); in testBlockingStub() 149 FooResponse fooResponse = FooResponse.newBuilder().build(); in testBlockingStub() 150 BarResponse barResponse = BarResponse.newBuilder().build(); in testBlockingStub() 225 UnittestNoGenericServices.TestMessage.newBuilder() in testNoGenericServices()
|
D | SingleFieldBuilderTest.java | 86 builder.setMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build()); in testSetMessage() 112 builder.setMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build()); in testClear() 139 builder.mergeFrom(TestAllTypes.newBuilder() in testMerge() 146 builder.setMessage(TestAllTypes.newBuilder() in testMerge() 149 builder.mergeFrom(TestAllTypes.newBuilder() in testMerge()
|
/external/guava/guava-tests/test/com/google/common/cache/ |
D | CacheBuilderSpecTest.java | 47 assertCacheBuilderEquivalence(CacheBuilder.newBuilder(), CacheBuilder.from(spec)); in testParse_empty() 61 CacheBuilder.newBuilder().initialCapacity(10), CacheBuilder.from(spec)); in testParse_initialCapacity() 83 CacheBuilder.newBuilder().maximumSize(9000), CacheBuilder.from(spec)); in testParse_maximumSize() 105 CacheBuilder.newBuilder().maximumWeight(9000), CacheBuilder.from(spec)); in testParse_maximumWeight() 137 CacheBuilder.newBuilder().concurrencyLevel(32), CacheBuilder.from(spec)); in testParse_concurrencyLevel() 160 CacheBuilder.newBuilder().weakKeys(), CacheBuilder.from(spec)); in testParse_weakKeys() 192 CacheBuilder.newBuilder().softValues(), CacheBuilder.from(spec)); in testParse_softValues() 215 CacheBuilder.newBuilder().weakValues(), CacheBuilder.from(spec)); in testParse_weakValues() 269 …CacheBuilder.newBuilder().expireAfterWrite(24 * 60 * 60 * 10L, TimeUnit.SECONDS), CacheBuilder.fro… in testParse_writeExpirationDays() 277 …CacheBuilder.newBuilder().expireAfterWrite(60 * 60 * 150L, TimeUnit.SECONDS), CacheBuilder.from(sp… in testParse_writeExpirationHours() [all …]
|
D | CacheBuilderGwtTest.java | 57 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testLoader() 84 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testSizeConstraint() 119 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() in testLoadingCache() 137 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testExpireAfterAccess() 154 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testExpireAfterWrite() 181 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testExpireAfterWriteAndAccess() 212 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testMapMethods() 279 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testRemovalListener() 318 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testPutAll() 336 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testInvalidate() [all …]
|
D | CacheEvictionTest.java | 46 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder() in testEviction_setMaxSegmentSize() 56 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder() in testEviction_setMaxSegmentWeight() 66 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() in testEviction_maxSizeOneSegment() 81 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() in testEviction_maxWeightOneSegment() 98 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() in testEviction_maxSize() 117 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() in testEviction_maxWeight() 137 CacheBuilder.newBuilder().maximumSize(MAX_SIZE).build(loader); in testUpdateRecency_onGet() 149 final LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() in testUpdateRecency_onInvalidate() 166 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() in testEviction_lru() 198 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() in testEviction_weightedLru() [all …]
|
D | CacheBuilderTest.java | 58 LoadingCache<String, Integer> cache = CacheBuilder.newBuilder() in testNewBuilder() 85 LoadingCache<?, ?> cache = CacheBuilder.newBuilder() in testInitialCapacity_small() 99 LoadingCache<?, ?> cache = CacheBuilder.newBuilder() in testInitialCapacity_smallest() 113 CacheBuilder.newBuilder().initialCapacity(Integer.MAX_VALUE); in testInitialCapacity_large() 137 LoadingCache<?, ?> cache = CacheBuilder.newBuilder() in testConcurrencyLevel_small() 145 CacheBuilder.newBuilder().concurrencyLevel(Integer.MAX_VALUE); in testConcurrencyLevel_large() 275 CacheBuilder.newBuilder() in testTimeToLive_small() 300 CacheBuilder.newBuilder() in testTimeToIdle_small() 317 CacheBuilder.newBuilder() in testTimeToIdleAndToLive() 399 final LoadingCache<String, String> cache = CacheBuilder.newBuilder() in testRemovalNotification_clear() [all …]
|
/external/protobuf/java/src/main/java/com/google/protobuf/ |
D | UnknownFieldSet.java | 63 public static Builder newBuilder() { in newBuilder() method in UnknownFieldSet 71 public static Builder newBuilder(final UnknownFieldSet copyFrom) { in newBuilder() method in UnknownFieldSet 72 return newBuilder().mergeFrom(copyFrom); in newBuilder() 240 return newBuilder().mergeFrom(input).build(); in parseFrom() 246 return newBuilder().mergeFrom(data).build(); in parseFrom() 252 return newBuilder().mergeFrom(data).build(); in parseFrom() 258 return newBuilder().mergeFrom(input).build(); in parseFrom() 262 return newBuilder(); in newBuilderForType() 266 return newBuilder().mergeFrom(this); in toBuilder() 316 lastField = Field.newBuilder(); in getFieldBuilder() [all …]
|
D | DynamicMessage.java | 92 return newBuilder(type).mergeFrom(input).buildParsed(); in parseFrom() 101 return newBuilder(type).mergeFrom(input, extensionRegistry).buildParsed(); in parseFrom() 107 return newBuilder(type).mergeFrom(data).buildParsed(); in parseFrom() 114 return newBuilder(type).mergeFrom(data, extensionRegistry).buildParsed(); in parseFrom() 120 return newBuilder(type).mergeFrom(data).buildParsed(); in parseFrom() 127 return newBuilder(type).mergeFrom(data, extensionRegistry).buildParsed(); in parseFrom() 133 return newBuilder(type).mergeFrom(input).buildParsed(); in parseFrom() 140 return newBuilder(type).mergeFrom(input, extensionRegistry).buildParsed(); in parseFrom() 144 public static Builder newBuilder(Descriptor type) { in newBuilder() method in DynamicMessage 152 public static Builder newBuilder(Message prototype) { in newBuilder() method in DynamicMessage [all …]
|
/external/guava/guava-gwt/test-super/com/google/common/cache/super/com/google/common/cache/ |
D | CacheBuilderTest.java | 40 LoadingCache<String, Integer> cache = CacheBuilder.newBuilder() in testNewBuilder() 66 CacheBuilder.newBuilder().initialCapacity(Integer.MAX_VALUE); in testInitialCapacity_large() 89 CacheBuilder.newBuilder().concurrencyLevel(Integer.MAX_VALUE); in testConcurrencyLevel_large() 119 CacheBuilder.newBuilder() in testTimeToLive_small() 144 CacheBuilder.newBuilder() in testTimeToIdle_small() 161 CacheBuilder.newBuilder() in testTimeToIdleAndToLive()
|
/external/guava/guava-tests/benchmark/com/google/common/cache/ |
D | MapMakerComparisonBenchmark.java | 41 CacheBuilder.newBuilder().recordStats().build(CacheLoader.from(IDENTITY)); 43 CacheBuilder.newBuilder().build(CacheLoader.from(IDENTITY)); 47 private final Cache<Object, Object> cache = CacheBuilder.newBuilder().recordStats().build(); 48 private final Cache<Object, Object> cacheNoStats = CacheBuilder.newBuilder().build();
|