/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/test/java/com/google/protobuf/ |
D | ByteStringTest.java | 33 import com.google.protobuf.ByteString.Output; 93 ByteString substring = ByteString.copyFrom(bytes).substring(500); in testSubstring_BeginIndex() 100 ByteString byteString = ByteString.copyFrom(bytes, 500, 200); in testCopyFrom_BytesOffsetSize() 107 ByteString byteString = ByteString.copyFrom(bytes); in testCopyFrom_Bytes() 117 ByteString byteString = ByteString.copyFrom(byteBuffer, 200); in testCopyFrom_ByteBufferSize() 127 ByteString byteString = ByteString.copyFrom(byteBuffer); in testCopyFrom_ByteBuffer() 134 ByteString byteString = ByteString.copyFrom(testString, UTF_16); in testCopyFrom_StringEncoding() 142 ByteString byteString = ByteString.copyFromUtf8(testString); in testCopyFrom_Utf8() 150 final List<ByteString> pieces = makeConcretePieces(testBytes); in testCopyFrom_Iterable() 152 ByteString byteString = ByteString.copyFrom(pieces); in testCopyFrom_Iterable() [all …]
|
D | RopeByteStringTest.java | 57 Iterator<ByteString> iter = ByteStringTest.makeConcretePieces(referenceBytes).iterator(); in setUp() 77 ByteString concatenated = ByteString.EMPTY; in testBalance() 79 concatenated = concatenated.concat(ByteString.copyFrom(testBytes, i * pieceSize, pieceSize)); in testBalance() 86 ByteString testString = ByteString.copyFrom(testBytes); in testBalance() 98 ByteString sourceByteString = ByteString.copyFromUtf8(sourceString); in testToString() 103 ByteString unicode = ByteString.EMPTY; in testToString() 115 ByteString flatString = ByteString.copyFromUtf8(testString); in testToString() 124 ByteString sourceByteString = ByteString.copyFromUtf8(sourceString); in testCharsetToString() 129 ByteString unicode = ByteString.EMPTY; in testCharsetToString() 141 ByteString flatString = ByteString.copyFromUtf8(testString); in testCharsetToString() [all …]
|
D | RopeByteStringSubstringTest.java | 48 Iterator<ByteString> iter = ByteStringTest.makeConcretePieces(sourceBytes).iterator(); in setUp() 49 ByteString sourceString = iter.next(); in setUp() 71 ByteString sourceByteString = ByteString.copyFromUtf8(sourceString); in testToString() 76 ByteString unicode = ByteString.EMPTY; in testToString() 92 ByteString flatString = ByteString.copyFromUtf8(testString); in testToString() 101 ByteString sourceByteString = ByteString.copyFromUtf8(sourceString); in testCharsetToString() 106 ByteString unicode = ByteString.EMPTY; in testCharsetToString() 122 ByteString flatString = ByteString.copyFromUtf8(testString); in testCharsetToString()
|
D | UnmodifiableLazyStringListTest.java | 50 private static ByteString BYTE_STRING_A = ByteString.copyFromUtf8("A"); 51 private static ByteString BYTE_STRING_B = ByteString.copyFromUtf8("B"); 52 private static ByteString BYTE_STRING_C = ByteString.copyFromUtf8("C"); 65 List<ByteString> byteStringList = list.asByteStringList(); in testReadOnlyMethods() 99 List<ByteString> byteStringList = list.asByteStringList(); in testModifyMethods() 146 List<ByteString> byteStringList = list.asByteStringList(); in testIterator() 147 Iterator<ByteString> byteIter = byteStringList.iterator(); in testIterator() 192 List<ByteString> byteStringList = list.asByteStringList(); in testListIterator() 193 ListIterator<ByteString> byteIter = byteStringList.listIterator(); in testListIterator()
|
D | IsValidUtf8Test.java | 147 ByteString leaf = factory.newByteString(realBytes); in assertValidUtf8() 148 ByteString sub = leaf.substring(0, bytes.length); in assertValidUtf8() 151 ByteString[] ropes = { in assertValidUtf8() 152 RopeByteString.newInstanceForTest(ByteString.EMPTY, leaf), in assertValidUtf8() 153 RopeByteString.newInstanceForTest(ByteString.EMPTY, sub), in assertValidUtf8() 154 RopeByteString.newInstanceForTest(leaf, ByteString.EMPTY), in assertValidUtf8() 155 RopeByteString.newInstanceForTest(sub, ByteString.EMPTY), in assertValidUtf8() 157 for (ByteString rope : ropes) { in assertValidUtf8() 174 private static ByteString asBytes(String s) { in asBytes() 175 return ByteString.copyFromUtf8(s); in asBytes()
|
D | BoundedByteStringTest.java | 55 stringUnderTest = ByteString.copyFrom(sourceBytes).substring(from, to); in setUp() 64 ByteString unicode = ByteString.wrap(testString.getBytes(Internal.UTF_8)); in testToString() 65 ByteString chopped = unicode.substring(2, unicode.size() - 6); in testToString() 77 ByteString unicode = ByteString.wrap(testString.getBytes(Internal.UTF_8)); in testCharsetToString() 78 ByteString chopped = unicode.substring(2, unicode.size() - 6); in testCharsetToString() 97 assertTrue("Didn't get a ByteString back", o instanceof ByteString); in testJavaSerialization()
|
D | LazyStringEndToEndTest.java | 48 private static ByteString TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8 = 49 ByteString.copyFrom(new byte[] { 53 private ByteString encodedTestAllTypes; 73 ByteString bytes = tV2.toByteString(); in testParseAndSerialize() 90 ByteString.copyFrom(sink)); in testParseAndWrite() 121 ByteString optional = proto.getOptionalStringBytes(); in testNoStringCachingIfOnlyBytesAccessed() 125 ByteString repeated0 = proto.getRepeatedStringBytes(0); in testNoStringCachingIfOnlyBytesAccessed() 126 ByteString repeated1 = proto.getRepeatedStringBytes(1); in testNoStringCachingIfOnlyBytesAccessed()
|
D | NioByteStringTest.java | 56 private static final ByteString EMPTY = new NioByteString(ByteBuffer.wrap(new byte[0])); 59 private static final int EXPECTED_HASH = ByteString.wrap(BYTES).hashCode(); 62 private final ByteString testString = new NioByteString(backingBuffer); 85 ByteString.ByteIterator iter = testString.iterator(); in testByteIterator() 403 ByteString.Output output = ByteString.newOutput(); in testNewOutput() 424 ByteString unicode = forString(testString); in testToString() 431 ByteString unicode = forString(testString); in testCharsetToString() 474 ByteString literal = ByteString.copyFrom(BYTES); in testEqualsLiteralByteString() 480 testString.equals(ByteString.EMPTY)); in testEqualsLiteralByteString() 482 ByteString.EMPTY, testString.substring(55, 55)); in testEqualsLiteralByteString() [all …]
|
D | WireFormatTest.java | 63 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 …]
|
D | CheckUtf8Test.java | 49 private static final ByteString UTF8_BYTE_STRING = 50 ByteString.copyFromUtf8(UTF8_BYTE_STRING_TEXT); 51 private static final ByteString NON_UTF8_BYTE_STRING = 52 ByteString.copyFrom(new byte[]{(byte) 0x80}); // A lone continuation byte. 60 ByteString serialized = in testParseRequiredStringWithGoodUtf8() 93 ByteString serialized = in testParseRequiredStringWithBadUtf8() 131 ByteString serialized = in testParseRequiredStringWithBadUtf8Size()
|
D | LiteralByteStringTest.java | 61 protected ByteString stringUnderTest; 68 stringUnderTest = ByteString.copyFrom(referenceBytes); in setUp() 91 ByteString.ByteIterator iter = stringUnderTest.iterator(); in testByteIterator() 380 ByteString.Output output = ByteString.newOutput(); in testNewOutput() 396 ByteString.EMPTY, output.toByteString()); in testNewOutput() 401 ByteString unicode = ByteString.wrap(testString.getBytes(Internal.UTF_8)); in testToString() 408 ByteString unicode = ByteString.wrap(testString.getBytes(Internal.UTF_8)); in testCharsetToString() 415 ByteString.EMPTY.toString(Internal.UTF_8), in testToString_returnsCanonicalEmptyString() 416 ByteString.wrap(new byte[]{}).toString(Internal.UTF_8)); in testToString_returnsCanonicalEmptyString() 421 ByteString.EMPTY.toString("invalid"); in testToString_raisesException() [all …]
|
D | UnknownFieldSetTest.java | 71 ByteString getBizarroData() throws Exception { in getBizarroData() 95 ByteString allFieldsData; 154 ByteString data = emptyMessage.toByteString(); in testSerialize() 228 ByteString data = fields.toByteString(); in testParseKnownAndUnknown() 244 ByteString bizarroData = getBizarroData(); in testWrongTypeTreatedAsUnknown() 269 ByteString bizarroData = getBizarroData(); in testWrongExtensionTypeTreatedAsUnknown() 288 ByteString data = in testParseUnknownEnumValue() 342 ByteString data = in testLargeVarint() 371 .addLengthDelimited(ByteString.EMPTY) in testEqualsAndHashCode() 455 ByteString data = emptyMessageLite.toByteString(); in testSerializeLite() [all …]
|
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/ |
D | ByteStringTest.java | 34 import com.google.protobuf.ByteString.Output; 92 ByteString substring = ByteString.copyFrom(bytes).substring(500); in testSubstring_BeginIndex() 99 ByteString byteString = ByteString.copyFrom(bytes, 500, 200); in testCopyFrom_BytesOffsetSize() 106 ByteString byteString = ByteString.copyFrom(bytes); in testCopyFrom_Bytes() 116 ByteString byteString = ByteString.copyFrom(byteBuffer, 200); in testCopyFrom_ByteBufferSize() 126 ByteString byteString = ByteString.copyFrom(byteBuffer); in testCopyFrom_ByteBuffer() 133 ByteString byteString = ByteString.copyFrom(testString, UTF_16); in testCopyFrom_StringEncoding() 141 ByteString byteString = ByteString.copyFromUtf8(testString); in testCopyFrom_Utf8() 149 final List<ByteString> pieces = makeConcretePieces(testBytes); in testCopyFrom_Iterable() 151 ByteString byteString = ByteString.copyFrom(pieces); in testCopyFrom_Iterable() [all …]
|
D | LazyStringEndToEndTest.java | 49 private static ByteString TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8 = 50 ByteString.copyFrom(new byte[] { 54 private ByteString encodedTestAllTypes; 74 ByteString bytes = tV2.toByteString(); in testParseAndSerialize() 91 ByteString.copyFrom(sink)); in testParseAndWrite() 97 ByteString optional = proto.getOptionalStringBytes(); in testNoStringCachingIfOnlyBytesAccessed() 101 ByteString repeated0 = proto.getRepeatedStringBytes(0); in testNoStringCachingIfOnlyBytesAccessed() 102 ByteString repeated1 = proto.getRepeatedStringBytes(1); in testNoStringCachingIfOnlyBytesAccessed()
|
D | RopeByteStringTest.java | 53 Iterator<ByteString> iter = ByteStringTest.makeConcretePieces(referenceBytes).iterator(); in setUp() 67 ByteString concatenated = ByteString.EMPTY; in testBalance() 69 concatenated = concatenated.concat(ByteString.copyFrom(testBytes, i * pieceSize, pieceSize)); in testBalance() 76 ByteString testString = ByteString.copyFrom(testBytes); in testBalance()
|
D | WireFormatTest.java | 60 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() 180 private void assertFieldsInOrder(ByteString data) throws Exception { in assertFieldsInOrder() 199 ByteString data = in testInterleavedFieldsAndExtensions() 210 ByteString dynamic_data = in testInterleavedFieldsAndExtensions() [all …]
|
D | LazyStringArrayListTest.java | 50 private static ByteString BYTE_STRING_A = ByteString.copyFromUtf8("A"); 51 private static ByteString BYTE_STRING_B = ByteString.copyFromUtf8("B"); 52 private static ByteString BYTE_STRING_C = ByteString.copyFromUtf8("C"); 112 ByteString aPrimeByteString = list.getByteString(0); in testConversionBackAndForth() 114 ByteString bPrimeByteString = list.getByteString(1); in testConversionBackAndForth()
|
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/csharp/src/Google.Protobuf.Test/ |
D | ByteStringTest.cs | 44 ByteString b1 = ByteString.CopyFrom(1, 2, 3); in Equality() 45 ByteString b2 = ByteString.CopyFrom(1, 2, 3); in Equality() 46 ByteString b3 = ByteString.CopyFrom(1, 2, 4); in Equality() 47 ByteString b4 = ByteString.CopyFrom(1, 2, 3, 4); in Equality() 59 Assert.IsTrue((ByteString) null == null); in Equality() 66 Assert.IsFalse((ByteString) null != null); in Equality() 72 Assert.AreEqual(0, ByteString.Empty.Length); in EmptyByteStringHasZeroSize() 78 ByteString bs = ByteString.CopyFrom("AB", Encoding.Unicode); in CopyFromStringWithExplicitEncoding() 89 Assert.IsTrue(ByteString.CopyFromUtf8("").IsEmpty); in IsEmptyWhenEmpty() 95 Assert.IsFalse(ByteString.CopyFromUtf8("X").IsEmpty); in IsEmptyWhenNotEmpty() [all …]
|
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/csharp/src/Google.Protobuf/ |
D | ByteString.cs | 44 public sealed class ByteString : IEnumerable<byte>, IEquatable<ByteString> class 46 private static readonly ByteString empty = new ByteString(new byte[0]); 59 internal static ByteString FromBytes(byte[] bytes) in FromBytes() 61 return new ByteString(bytes); in FromBytes() 68 internal static byte[] GetBuffer(ByteString bytes) in GetBuffer() 77 internal static ByteString AttachBytes(byte[] bytes) in AttachBytes() 79 return new ByteString(bytes); in AttachBytes() 86 private ByteString(byte[] bytes) in ByteString() method in Google.Protobuf.ByteString 94 public static ByteString Empty 137 public static ByteString FromBase64(string bytes) in FromBase64() [all …]
|
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/main/java/com/google/protobuf/ |
D | ByteString.java | 68 public abstract class ByteString implements Iterable<Byte>, Serializable { class 89 public static final ByteString EMPTY = new LiteralByteString(Internal.EMPTY_BYTE_ARRAY); 147 ByteString() {} in ByteString() method in ByteString 244 public final ByteString substring(int beginIndex) { in substring() 258 public abstract ByteString substring(int beginIndex, int endIndex); in substring() 269 public final boolean startsWith(ByteString prefix) { in startsWith() 283 public final boolean endsWith(ByteString suffix) { in endsWith() 299 public static ByteString copyFrom(byte[] bytes, int offset, int size) { in copyFrom() 309 public static ByteString copyFrom(byte[] bytes) { in copyFrom() 317 static ByteString wrap(byte[] bytes) { in wrap() [all …]
|
D | RopeByteString.java | 73 final class RopeByteString extends ByteString { 118 private final ByteString left; 119 private final ByteString right; 132 private RopeByteString(ByteString left, ByteString right) { in RopeByteString() 155 static ByteString concatenate(ByteString left, ByteString right) { in concatenate() 165 if (newLength < ByteString.CONCATENATE_BY_COPY_SIZE) { in concatenate() 184 ByteString newRight = concatenateBytes(leftRope.right, right); in concatenate() 195 ByteString newRight = new RopeByteString(leftRope.right, right); in concatenate() 218 private static ByteString concatenateBytes(ByteString left, in concatenateBytes() 219 ByteString right) { in concatenateBytes() [all …]
|
D | LazyStringArrayList.java | 118 } else if (o instanceof ByteString) { in get() 119 ByteString bs = (ByteString) o; in get() 154 private void add(int index, ByteString element) { in add() 188 public boolean addAllByteString(Collection<? extends ByteString> values) { in addAllByteString() 219 public void add(ByteString element) { in add() 238 public ByteString getByteString(int index) { in getByteString() 240 ByteString b = asByteString(o); in getByteString() 258 public void set(int index, ByteString s) { in set() 262 private Object setAndReturn(int index, ByteString s) { in setAndReturn() 280 } else if (o instanceof ByteString) { in asString() [all …]
|
D | LazyFieldLite.java | 90 private ByteString delayedBytes; 111 private volatile ByteString memoizedBytes; 116 public LazyFieldLite(ExtensionRegistryLite extensionRegistry, ByteString bytes) { in LazyFieldLite() 179 return memoizedBytes == ByteString.EMPTY in containsDefaultInstance() 180 || value == null && (delayedBytes == null || delayedBytes == ByteString.EMPTY); in containsDefaultInstance() 353 MessageLite value, ByteString otherBytes, ExtensionRegistryLite extensionRegistry) { in mergeValueAndBytes() 366 public void setByteString(ByteString bytes, ExtensionRegistryLite extensionRegistry) { in setByteString() 396 public ByteString toByteString() { in toByteString() 410 memoizedBytes = ByteString.EMPTY; in toByteString() 438 this.memoizedBytes = ByteString.EMPTY; in ensureInitialized() [all …]
|
D | LazyStringList.java | 58 ByteString getByteString(int index); in getByteString() 89 void add(ByteString element); in add() 112 void set(int index, ByteString element); in set() 136 boolean addAllByteString(Collection<? extends ByteString> c); in addAllByteString()
|
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/ruby/src/main/java/com/google/protobuf/jruby/ |
D | SentinelOuterClass.java | 74 com.google.protobuf.ByteString 95 com.google.protobuf.ByteString getDefaultBytes(); in getDefaultBytes() 117 defaultBytes_ = com.google.protobuf.ByteString.EMPTY; in Sentinel() 207 com.google.protobuf.ByteString bs = in getDefaultString() 208 (com.google.protobuf.ByteString) ref; in getDefaultString() 219 public com.google.protobuf.ByteString 223 com.google.protobuf.ByteString b = in getDefaultStringBytes() 224 com.google.protobuf.ByteString.copyFromUtf8( in getDefaultStringBytes() 229 return (com.google.protobuf.ByteString) ref; in getDefaultStringBytes() 261 private com.google.protobuf.ByteString defaultBytes_; [all …]
|