/external/okio/okio/src/commonTest/kotlin/okio/ |
D | ByteStringTest.kt | 60 val byteString = factory.decodeHex("ab12") in getByte() constant 61 assertEquals(-85, byteString[0].toLong()) in getByte() 62 assertEquals(18, byteString[1].toLong()) in getByte() 66 val byteString = factory.decodeHex("112233") in startsWithByteString() constant 67 assertTrue(byteString.startsWith("".decodeHex())) in startsWithByteString() 68 assertTrue(byteString.startsWith("11".decodeHex())) in startsWithByteString() 69 assertTrue(byteString.startsWith("1122".decodeHex())) in startsWithByteString() 70 assertTrue(byteString.startsWith("112233".decodeHex())) in startsWithByteString() 71 assertFalse(byteString.startsWith("2233".decodeHex())) in startsWithByteString() 72 assertFalse(byteString.startsWith("11223344".decodeHex())) in startsWithByteString() [all …]
|
/external/okio/okio/src/jvmTest/java/okio/ |
D | ByteStringJavaTest.java | 98 ByteString byteString = ByteString.of(bytes); in ofCopy() local 101 assertEquals("Hello, World!", byteString.utf8()); in ofCopy() 106 ByteString byteString = ByteString.of(bytes, 2, 9); in ofCopyRange() local 109 assertEquals("llo, Worl", byteString.utf8()); in ofCopyRange() 116 ByteString byteString = ByteString.of(byteBuffer); in ofByteBuffer() local 119 assertEquals("llo, Worl", byteString.utf8()); in ofByteBuffer() 123 ByteString byteString = factory.decodeHex("ab12"); in getByte() local 124 assertEquals(-85, byteString.getByte(0)); in getByte() 125 assertEquals(18, byteString.getByte(1)); in getByte() 129 ByteString byteString = factory.decodeHex("ab12"); in getByteOutOfBounds() local [all …]
|
/external/okhttp/okio/okio/src/test/java/okio/ |
D | ByteStringTest.java | 39 ByteString byteString = ByteString.of(bytes, 2, 9); in ofCopyRange() local 42 assertEquals("llo, Worl", byteString.utf8()); in ofCopyRange() 46 ByteString byteString = ByteString.decodeHex("ab12"); in getByte() local 47 assertEquals(-85, byteString.getByte(0)); in getByte() 48 assertEquals(18, byteString.getByte(1)); in getByte() 52 ByteString byteString = ByteString.decodeHex("ab12"); in getByteOutOfBounds() local 54 byteString.getByte(2); in getByteOutOfBounds() 61 ByteString byteString = ByteString.decodeHex("000102"); in equals() local 62 assertTrue(byteString.equals(byteString)); in equals() 63 assertTrue(byteString.equals(ByteString.decodeHex("000102"))); in equals() [all …]
|
D | SegmentSharingTest.java | 39 ByteString byteString = concatenateBuffers(xs, ys, zs).snapshot(); in snapshotsAreEquivalent() local 40 assertEquivalent(byteString, concatenateBuffers(xs, ys + zs).snapshot()); in snapshotsAreEquivalent() 41 assertEquivalent(byteString, concatenateBuffers(xs + ys + zs).snapshot()); in snapshotsAreEquivalent() 42 assertEquivalent(byteString, ByteString.encodeUtf8(xs + ys + zs)); in snapshotsAreEquivalent() 46 ByteString byteString = concatenateBuffers(xs, ys, zs).snapshot(); in snapshotGetByte() local 47 assertEquals('x', byteString.getByte(0)); in snapshotGetByte() 48 assertEquals('x', byteString.getByte(xs.length() - 1)); in snapshotGetByte() 49 assertEquals('y', byteString.getByte(xs.length())); in snapshotGetByte() 50 assertEquals('y', byteString.getByte(xs.length() + ys.length() - 1)); in snapshotGetByte() 51 assertEquals('z', byteString.getByte(xs.length() + ys.length())); in snapshotGetByte() [all …]
|
/external/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/ |
D | ByteStringTest.java | 99 ByteString byteString = ByteString.copyFrom(bytes, 500, 200); in testCopyFrom_BytesOffsetSize() local 101 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_BytesOffsetSize() 106 ByteString byteString = ByteString.copyFrom(bytes); in testCopyFrom_Bytes() local 108 isArray(byteString.toByteArray(), bytes)); in testCopyFrom_Bytes() 116 ByteString byteString = ByteString.copyFrom(byteBuffer, 200); in testCopyFrom_ByteBufferSize() local 118 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_ByteBufferSize() 126 ByteString byteString = ByteString.copyFrom(byteBuffer); in testCopyFrom_ByteBuffer() local 128 isArrayRange(byteString.toByteArray(), bytes, 500, bytes.length - 500)); in testCopyFrom_ByteBuffer() 133 ByteString byteString = ByteString.copyFrom(testString, UTF_16); in testCopyFrom_StringEncoding() local 136 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding() [all …]
|
/external/okio/okio/src/jvmTest/kotlin/okio/ |
D | SegmentSharingTest.kt | 35 val byteString = bufferWithSegments(xs, ys, zs).snapshot() in snapshotsAreEquivalent() constant 36 assertEquivalent(byteString, bufferWithSegments(xs, ys + zs).snapshot()) in snapshotsAreEquivalent() 37 assertEquivalent(byteString, bufferWithSegments(xs + ys + zs).snapshot()) in snapshotsAreEquivalent() 38 assertEquivalent(byteString, (xs + ys + zs).encodeUtf8()) in snapshotsAreEquivalent() 42 val byteString = bufferWithSegments(xs, ys, zs).snapshot() in snapshotGetByte() constant 43 assertEquals('x', byteString[0].toChar()) in snapshotGetByte() 44 assertEquals('x', byteString[xs.length - 1].toChar()) in snapshotGetByte() 45 assertEquals('y', byteString[xs.length].toChar()) in snapshotGetByte() 46 assertEquals('y', byteString[xs.length + ys.length - 1].toChar()) in snapshotGetByte() 47 assertEquals('z', byteString[xs.length + ys.length].toChar()) in snapshotGetByte() [all …]
|
D | ByteStringKotlinTest.kt | 60 val byteString = "abcdef".encodeUtf8() in substring() constant 61 assertEquals(byteString.substring(), "abcdef".encodeUtf8()) in substring() 62 assertEquals(byteString.substring(endIndex = 3), "abc".encodeUtf8()) in substring() 63 assertEquals(byteString.substring(beginIndex = 3), "def".encodeUtf8()) in substring() 64 assertEquals(byteString.substring(beginIndex = 1, endIndex = 5), "bcde".encodeUtf8()) in substring()
|
/external/cbor-java/src/test/java/co/nstant/in/cbor/model/ |
D | ByteStringTest.java | 29 ByteString byteString = new ByteString(bytes); in shouldEquals() local 30 assertTrue(byteString.equals(byteString)); in shouldEquals() 36 ByteString byteString = new ByteString(bytes); in shouldNotEquals() local 37 assertFalse(byteString.equals(new Object())); in shouldNotEquals() 44 ByteString byteString = new ByteString(bytes); in shouldHashcode() local 45 assertEquals(byteString.hashCode(), superClass.hashCode() ^ Arrays.hashCode(bytes)); in shouldHashcode() 51 ByteString byteString = new ByteString(bytes); in shouldNotClone() local 52 assertEquals(byteString.getBytes(), bytes); in shouldNotClone()
|
/external/protobuf/java/core/src/test/java/com/google/protobuf/ |
D | ByteStringTest.java | 134 ByteString byteString = ByteString.copyFrom(bytes, 500, 200); in testCopyFrom_BytesOffsetSize() local 137 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_BytesOffsetSize() 142 ByteString byteString = ByteString.copyFrom(bytes); in testCopyFrom_Bytes() local 144 "copyFrom must contain the expected bytes", isArray(byteString.toByteArray(), bytes)); in testCopyFrom_Bytes() 152 ByteString byteString = ByteString.copyFrom(byteBuffer, 200); in testCopyFrom_ByteBufferSize() local 155 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_ByteBufferSize() 163 ByteString byteString = ByteString.copyFrom(byteBuffer); in testCopyFrom_ByteBuffer() local 166 isArrayRange(byteString.toByteArray(), bytes, 500, bytes.length - 500)); in testCopyFrom_ByteBuffer() 171 ByteString byteString = ByteString.copyFrom(testString, UTF_16); in testCopyFrom_StringEncoding() local 175 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding() [all …]
|
D | RopeByteStringTest.java | 186 ByteString byteString = RopeByteString.newInstanceForTest(ByteString.EMPTY, ByteString.EMPTY); in testToString_raisesException() local 187 byteString.toString("invalid"); in testToString_raisesException() 194 ByteString byteString = in testToString_raisesException() local 197 byteString.toString("invalid"); in testToString_raisesException()
|
/external/okio/okio/jvm/jmh/src/jmh/java/com/squareup/okio/benchmarks/ |
D | SegmentedByteStringBenchmark.java | 50 private ByteString byteString; field in SegmentedByteStringBenchmark 67 byteString = buffer.snapshot(length); in setup() 72 return byteString.substring(1, byteString.size() - 1); in substring() 77 return byteString.md5(); in md5() 82 return byteString.indexOf(UNKNOWN); in indexOfUnknown() 87 return byteString.lastIndexOf(UNKNOWN); in lastIndexOfUnknown() 92 return byteString.indexOf(SEARCH); in indexOfEarly() 97 return byteString.lastIndexOf(SEARCH); in lastIndexOfEarly()
|
D | IndexOfElementBenchmark.java | 43 ByteString byteString = ByteString.encodeUtf8("abcd"); field in IndexOfElementBenchmark 53 .write(byteString) in setup() 54 .write(new byte[(bufferSize / 2) - byteString.size()]); in setup() 64 buffer.indexOf(byteString, 0L); in indexOfByteString() 69 buffer.indexOfElement(byteString, 0L); in indexOfElement()
|
/external/okio/samples/src/jvmMain/kotlin/okio/samples/ |
D | Hashing.kt | 34 val byteString = readByteString(file) in <lambda>() constant 35 println(" md5: " + byteString.md5().hex()) in <lambda>() 36 println(" sha1: " + byteString.sha1().hex()) in <lambda>() 37 println(" sha256: " + byteString.sha256().hex()) in <lambda>() 38 println(" sha512: " + byteString.sha512().hex()) in <lambda>() 72 println("hmacSha256: " + byteString.hmacSha256(secret).hex()) in <lambda>()
|
/external/okio/samples/src/jvmMain/java/okio/samples/ |
D | Hashing.java | 34 ByteString byteString = readByteString(file); in run() local 35 System.out.println(" md5: " + byteString.md5().hex()); in run() 36 System.out.println(" sha1: " + byteString.sha1().hex()); in run() 37 System.out.println(" sha256: " + byteString.sha256().hex()); in run() 38 System.out.println(" sha512: " + byteString.sha512().hex()); in run() 69 System.out.println("hmacSha256: " + byteString.hmacSha256(secret).hex()); in run()
|
/external/cbor-java/src/main/java/co/nstant/in/cbor/decoder/ |
D | ByteStringDecoder.java | 26 ByteString byteString = new ByteString(null); in decode() local 27 byteString.setChunked(true); in decode() 28 return byteString; in decode() 46 ByteString byteString = (ByteString) dataItem; in decodeInfinitiveLength() local 47 byte[] byteArray = byteString.getBytes(); in decodeInfinitiveLength()
|
/external/okio/okio/src/commonMain/kotlin/okio/ |
D | Options.kt | 44 byteStrings.forEachIndexed { callerIndex, byteString -> in <lambda>() method 45 val sortedIndex = list.binarySearch(byteString) in <lambda>() 58 val byteString = list[b] in <lambda>() constant 59 if (!byteString.startsWith(prefix)) break in <lambda>() 60 require(byteString.size != prefix.size) { "duplicate option: $byteString" } in <lambda>()
|
/external/okhttp/okio/okio/src/main/java/okio/ |
D | ByteString.java | 86 ByteString byteString = new ByteString(s.getBytes(Util.UTF_8)); in encodeUtf8() local 87 byteString.utf8 = s; in encodeUtf8() 88 return byteString; in encodeUtf8() 336 @Override public int compareTo(ByteString byteString) { in compareTo() argument 338 int sizeB = byteString.size(); in compareTo() 341 int byteB = byteString.getByte(i) & 0xff; in compareTo() 363 ByteString byteString = ByteString.read(in, dataLength); in readObject() local 367 field.set(this, byteString.data); in readObject()
|
/external/okhttp/repackaged/okio/okio/src/main/java/com/android/okhttp/okio/ |
D | ByteString.java | 88 ByteString byteString = new ByteString(s.getBytes(Util.UTF_8)); in encodeUtf8() local 89 byteString.utf8 = s; in encodeUtf8() 90 return byteString; in encodeUtf8() 338 @Override public int compareTo(ByteString byteString) { in compareTo() argument 340 int sizeB = byteString.size(); in compareTo() 343 int byteB = byteString.getByte(i) & 0xff; in compareTo() 365 ByteString byteString = ByteString.read(in, dataLength); in readObject() local 369 field.set(this, byteString.data); in readObject()
|
/external/okio/okio/src/nonJvmMain/kotlin/okio/ |
D | RealBufferedSink.kt | 46 override fun write(byteString: ByteString) = commonWrite(byteString) 47 override fun write(byteString: ByteString, offset: Int, byteCount: Int) = 48 commonWrite(byteString, offset, byteCount)
|
/external/cbor-java/src/main/java/co/nstant/in/cbor/encoder/ |
D | ByteStringEncoder.java | 18 public void encode(ByteString byteString) throws CborException { in encode() argument 19 byte[] bytes = byteString.getBytes(); in encode() 20 if (byteString.isChunked()) { in encode()
|
/external/okio/okio/src/jvmMain/kotlin/okio/ |
D | RealBufferedSink.kt | 55 override fun write(byteString: ByteString) = commonWrite(byteString) in buffer() 56 override fun write(byteString: ByteString, offset: Int, byteCount: Int) = in buffer() 57 commonWrite(byteString, offset, byteCount) in buffer()
|
/external/okio/okio/src/appleTest/kotlin/okio/ |
D | AppleByteStringTest.kt | 28 val byteString = data.toByteString() in nsDataToByteString() constant 29 assertEquals("Hello", byteString.utf8()) in nsDataToByteString()
|
/external/okio/okio/src/commonMain/kotlin/okio/internal/ |
D | RealBufferedSink.kt | 36 internal inline fun RealBufferedSink.commonWrite(byteString: ByteString): BufferedSink { in commonWrite() 38 buffer.write(byteString) in commonWrite() 43 byteString: ByteString, in commonWrite() 48 buffer.write(byteString, offset, byteCount) in commonWrite()
|
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/ |
D | TestStringByteConverter.java | 123 StringByteConverter byteString = type == Type.utf8 ? new Utf8StringByteConverter() in testString() local 126 int byteLen = byteString.toBytes(test, bytes, 0); in testString() 129 byteString.clear(); in testString() 132 int byteCount = byteString.toBytes(test.charAt(i), bytes2, 0); in testString() 156 byteString.fromBytes(bytes, 0, byteLen, chars); in testString()
|
/external/pdfium/fxbarcode/ |
D | cbc_codabar.cpp | 43 ByteString byteString = m_renderContents.ToUTF8(); in Encode() local 46 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
|