Home
last modified time | relevance | path

Searched refs:toLong (Results 1 – 25 of 122) sorted by relevance

12345

/external/okio/okio/src/commonTest/kotlin/okio/
DByteStringTest.kt61 assertEquals(-85, byteString[0].toLong()) in getByte()
62 assertEquals(18, byteString[1].toLong()) in getByte()
111 assertEquals(0, byteString.indexOf("112233".decodeHex()).toLong()) in indexOfByteString()
112 assertEquals(0, byteString.indexOf("1122".decodeHex()).toLong()) in indexOfByteString()
113 assertEquals(0, byteString.indexOf("11".decodeHex()).toLong()) in indexOfByteString()
114 assertEquals(0, byteString.indexOf("11".decodeHex(), 0).toLong()) in indexOfByteString()
115 assertEquals(0, byteString.indexOf("".decodeHex()).toLong()) in indexOfByteString()
116 assertEquals(0, byteString.indexOf("".decodeHex(), 0).toLong()) in indexOfByteString()
117 assertEquals(1, byteString.indexOf("2233".decodeHex()).toLong()) in indexOfByteString()
118 assertEquals(1, byteString.indexOf("22".decodeHex()).toLong()) in indexOfByteString()
[all …]
DAbstractBufferedSourceTest.kt50 assertEquals(0xab, (source.readByte() and 0xff).toLong()) in readBytes()
51 assertEquals(0xcd, (source.readByte() and 0xff).toLong()) in readBytes()
64 assertEquals(0xabcd.toShort().toLong(), source.readShort().toLong()) in readShort()
65 assertEquals(0xef01.toShort().toLong(), source.readShort().toLong()) in readShort()
72 assertEquals(0xcdab.toShort().toLong(), source.readShortLe().toLong()) in readShortLe()
73 assertEquals(0x10ef.toShort().toLong(), source.readShortLe().toLong()) in readShortLe()
81 source.skip((Segment.SIZE - 1).toLong()) in readShortSplitAcrossMultipleSegments()
82 assertEquals(0xabcd.toShort().toLong(), source.readShort().toLong()) in readShortSplitAcrossMultipleSegments()
118 assertEquals(-0x543210ff, source.readInt().toLong()) in readInt()
119 assertEquals(-0x789abcdf, source.readInt().toLong()) in readInt()
[all …]
DCommonBufferTest.kt97 buffer.skip(SegmentPool.MAX_SIZE.toLong()) in fillAndDrainPool()
101 buffer.skip(SegmentPool.MAX_SIZE.toLong()) in fillAndDrainPool()
147 assertEquals(expected.toString(), buffer.readUtf8(expected.length.toLong())) in moveBytesBetweenBuffers()
160 sink.write(source, writeSize.toLong()) in writeSplitSourceBufferLeft()
175 sink.write(source, writeSize.toLong()) in writeSplitSourceBufferRight()
192 assertEquals((Segment.SIZE * 2 - 20).toLong(), source.size) in writePrefixDoesntSplit()
198 sink.readUtf8((Segment.SIZE - 20).toLong()) // pos = size = 20 in writePrefixDoesntSplitButRequiresCompact()
207 assertEquals((Segment.SIZE * 2 - 20).toLong(), source.size) in writePrefixDoesntSplitButRequiresCompact()
244 … assertEquals((halfSegment - 1).toLong(), buffer.indexOf('a'.toByte(), (halfSegment - 1).toLong())) in indexOfWithOffset()
245 assertEquals(halfSegment.toLong(), buffer.indexOf('b'.toByte(), (halfSegment - 1).toLong())) in indexOfWithOffset()
[all …]
DHashingSourceTest.kt85 assertEquals('a'.toLong(), bufferedSource.readUtf8CodePoint().toLong()) in multipleReads()
87 assertEquals('b'.toLong(), bufferedSource.readUtf8CodePoint().toLong()) in multipleReads()
89 assertEquals('c'.toLong(), bufferedSource.readUtf8CodePoint().toLong()) in multipleReads()
117 assertEquals(HashingTest.r32k.size.toLong(), hashingSource.read(sink, Long.MAX_VALUE)) in readIntoSuffixOfBuffer()
DCommonRealBufferedSourceTest.kt85 assertEquals(Segment.SIZE.toLong(), source.size) in requireReadsOneSegmentAtATime()
86 assertEquals(Segment.SIZE.toLong(), bufferedSource.buffer.size) in requireReadsOneSegmentAtATime()
95 assertEquals(Segment.SIZE.toLong(), source.size) in skipReadsOneSegmentAtATime()
96 assertEquals(Segment.SIZE.toLong() - 2L, bufferedSource.buffer.size) in skipReadsOneSegmentAtATime()
149 assertEquals(Segment.SIZE.toLong() * 3L, bufferedSource.readAll(mockSink)) in readAllReadsOneSegmentAtATime()
DCommonRealBufferedSinkTest.kt35 assertEquals(Segment.SIZE.toLong(), sink.size) in bufferedSinkEmitsTailWhenItIsComplete()
43 assertEquals(Segment.SIZE.toLong() * 3L, sink.size) in bufferedSinkEmitMultipleSegments()
44 assertEquals(Segment.SIZE.toLong() - 1L, bufferedSink.buffer.size) in bufferedSinkEmitMultipleSegments()
84 assertEquals(Segment.SIZE.toLong() * 3L, sink.size) in completeSegmentsEmitted()
91 assertEquals(Segment.SIZE.toLong() * 2L, sink.size) in incompleteSegmentsNotEmitted()
194 assertEquals(Segment.SIZE.toLong() * 3L, bufferedSink.writeAll(source)) in writeAllWritesOneSegmentAtATime()
Dutil.kt63 segment.skip(offset.toLong()) in bufferWithRandomSegmentLayout()
65 result.write(segment, byteCount.toLong()) in bufferWithRandomSegmentLayout()
79 buffer.skip(offsetInSegment.toLong()) in bufferWithSegments()
/external/okio/okio/src/jvmTest/kotlin/okio/
DTestUtil.kt82 sink.size += Segment.SIZE.toLong() in randomSource()
83 bytesLeft -= Segment.SIZE.toLong() in randomSource()
84 return Segment.SIZE.toLong() in randomSource()
111 assertEquals(b1.hashCode().toLong(), b2.hashCode().toLong()) in assertEquivalent()
112 assertEquals(b1.hashCode().toLong(), b1.hashCode().toLong()) in assertEquivalent()
116 assertEquals(b1.size.toLong(), b2.size.toLong()) in assertEquivalent()
120 assertEquals(b.toLong(), b1[i].toLong()) in assertEquivalent()
148 assertEquals(b1.hashCode().toLong(), b2.hashCode().toLong()) in assertEquivalent()
149 assertEquals(b1.hashCode().toLong(), b1.hashCode().toLong()) in assertEquivalent()
159 assertEquals(b.toLong(), b1[i.toLong()].toLong()) in assertEquivalent()
[all …]
/external/rappor/client/javatest/com/google/android/rappor/
DEncoderTest.java47 private static long toLong(byte[] bytes) { in toLong() method in EncoderTest
421 toLong( in testEncoderEncodeBits_identity()
435 toLong( in testEncoderEncodeBits_identity()
466 toLong( in testEncoderEncodeBoolean_identity()
480 toLong( in testEncoderEncodeBoolean_identity()
497 toLong( in testEncoderEncodeOrdinal_identity()
511 toLong( in testEncoderEncodeOrdinal_identity()
556 toLong( in testEncoderEncodeString_identity()
572 toLong( in testEncoderEncodeString_identity()
595 assertEquals(0b000011000000L, toLong(cohortProbeEncoder.encodeString("Whizbang"))); in testEncoderEncodeString_identity()
[all …]
/external/okio/okio/src/commonMain/kotlin/okio/internal/
DRealBufferedSource.kt39 val read = source.read(buffer, Segment.SIZE.toLong()) in commonRead()
49 return buffer.exhausted() && source.read(buffer, Segment.SIZE.toLong()) == -1L in commonExhausted()
60 if (source.read(buffer, Segment.SIZE.toLong()) == -1L) return false in commonRequest()
91 if (source.read(buffer, Segment.SIZE.toLong()) == -1L) return -1 in commonSelect()
96 buffer.skip(selectedSize.toLong()) in commonSelect()
115 require(sink.size.toLong()) in commonReadFully()
131 checkOffsetAndCount(sink.size.toLong(), offset.toLong(), byteCount.toLong()) in commonRead()
134 val read = source.read(buffer, Segment.SIZE.toLong()) in commonRead()
156 while (source.read(buffer, Segment.SIZE.toLong()) != -1L) { in commonReadAll()
279 while (request((pos + 1).toLong())) { in commonReadHexadecimalUnsignedLong()
[all …]
DBuffer.kt114 offset -= (s.limit - s.pos).toLong() in seek()
249 offset -= (s.limit - s.pos).toLong() in commonCopyTo()
265 byteCount -= (copy.limit - copy.pos).toLong() in commonCopyTo()
280 result -= (tail.limit - tail.pos).toLong() in commonCompleteSegmentByteCount()
423 size -= toSkip.toLong() in commonClear()
424 byteCount -= toSkip.toLong() in commonClear()
505 this.size += width.toLong() in commonWriteDecimalLong()
548 size += width.toLong() in commonWriteHexadecimalUnsignedLong()
578 checkOffsetAndCount(source.size.toLong(), offset.toLong(), byteCount.toLong()) in commonWrite()
596 size += byteCount.toLong() in commonWrite()
[all …]
/external/icu/icu4j/samples/src/com/ibm/icu/samples/util/timescale/
DPivotDemo.java53 …cal.setTimeInMillis(UniversalTimeScale.toLong(UniversalTimeScale.from(0, UniversalTimeScale.JAVA_T… in main()
57 …cal.setTimeInMillis(UniversalTimeScale.toLong(UniversalTimeScale.from(-62164684800000L, UniversalT… in main()
61 …cal.setTimeInMillis(UniversalTimeScale.toLong(UniversalTimeScale.from(-62135769600000L, UniversalT… in main()
67 …cal.setTimeInMillis(UniversalTimeScale.toLong(UniversalTimeScale.from(0x80000000, UniversalTimeSca… in main()
71 …cal.setTimeInMillis(UniversalTimeScale.toLong(UniversalTimeScale.from(0, UniversalTimeScale.UNIX_T… in main()
75 …cal.setTimeInMillis(UniversalTimeScale.toLong(UniversalTimeScale.from(0x7FFFFFFF, UniversalTimeSca… in main()
/external/kotlinx.coroutines/benchmarks/src/jmh/kotlin/benchmarks/flow/
DCombineTwoFlowsBenchmark.kt26 val flow = (1 until size.toLong()).asFlow() in <lambda>()
32 val flow = (1 until size.toLong()).asFlow() in <lambda>()
38 val flow = (1 until size.toLong()).asFlow() in <lambda>()
44 val flow = (1 until size.toLong()).asFlow() in <lambda>()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timescale/
DTimeScaleAPITest.java310 result = UniversalTimeScale.toLong(0L, -1); in TestToLong()
321 result = UniversalTimeScale.toLong(0L, scale); in TestToLong()
328 result = UniversalTimeScale.toLong(toMin, scale); in TestToLong()
336 result = UniversalTimeScale.toLong(toMin - 1, scale); in TestToLong()
344 result = UniversalTimeScale.toLong(toMax, scale); in TestToLong()
352 result = UniversalTimeScale.toLong(toMax + 1, scale); in TestToLong()
361 result = UniversalTimeScale.toLong(0L, UniversalTimeScale.MAX_SCALE); in TestToLong()
DTimeScaleDataTest.java45 long rt = UniversalTimeScale.toLong(UniversalTimeScale.from(value, scale), scale); in roundTripTest()
54 long result = UniversalTimeScale.toLong(toLimit, scale); in toLimitTest()
65 long local = UniversalTimeScale.toLong(universalEpoch, scale); in epochOffsetTest()
72 local = UniversalTimeScale.toLong(0, scale); in epochOffsetTest()
238 …millis = UniversalTimeScale.toLong(dotNetDateTimeTicks[i + kTicks], UniversalTimeScale.ICU4C_TIME); in TestDotNet()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/timescale/
DTimeScaleAPITest.java313 result = UniversalTimeScale.toLong(0L, -1); in TestToLong()
324 result = UniversalTimeScale.toLong(0L, scale); in TestToLong()
331 result = UniversalTimeScale.toLong(toMin, scale); in TestToLong()
339 result = UniversalTimeScale.toLong(toMin - 1, scale); in TestToLong()
347 result = UniversalTimeScale.toLong(toMax, scale); in TestToLong()
355 result = UniversalTimeScale.toLong(toMax + 1, scale); in TestToLong()
364 result = UniversalTimeScale.toLong(0L, UniversalTimeScale.MAX_SCALE); in TestToLong()
DTimeScaleDataTest.java48 long rt = UniversalTimeScale.toLong(UniversalTimeScale.from(value, scale), scale); in roundTripTest()
57 long result = UniversalTimeScale.toLong(toLimit, scale); in toLimitTest()
68 long local = UniversalTimeScale.toLong(universalEpoch, scale); in epochOffsetTest()
75 local = UniversalTimeScale.toLong(0, scale); in epochOffsetTest()
241 …millis = UniversalTimeScale.toLong(dotNetDateTimeTicks[i + kTicks], UniversalTimeScale.ICU4C_TIME); in TestDotNet()
/external/okio/okio/src/hashFunctions/kotlin/okio/internal/
DSha512.kt83 words[w] = ((input[pos++].toLong() and 0xff) shl 56) or in processChunk()
84 ((input[pos++].toLong() and 0xff) shl 48) or in processChunk()
85 ((input[pos++].toLong() and 0xff) shl 40) or in processChunk()
86 ((input[pos++].toLong() and 0xff) shl 32) or in processChunk()
87 ((input[pos++].toLong() and 0xff) shl 24) or in processChunk()
88 ((input[pos++].toLong() and 0xff) shl 16) or in processChunk()
89 ((input[pos++].toLong() and 0xff) shl 8) or in processChunk()
90 ((input[pos++].toLong() and 0xff)) in processChunk()
/external/icu/icu4j/tools/misc/src/com/ibm/icu/dev/tool/timescale/
DCalculateLimits.java86 … if(UniversalTimeScale.toLong(UniversalTimeScale.from(minLong, scale), scale) != minLong) { in main()
90 … if(UniversalTimeScale.toLong(UniversalTimeScale.from(maxLong, scale), scale) != maxLong) { in main()
95 if(UniversalTimeScale.toLong(min.longValue(), scale) != minLong) { in main()
99 if(UniversalTimeScale.toLong(max.longValue(), scale) != maxLong) { in main()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/internal/
DSystemProps.common.kt35 ): Int = systemProp(propertyName, defaultValue.toLong(), minValue.toLong(), maxValue.toLong()).toIn… in systemProp()
/external/okio/okio/src/jvmMain/kotlin/okio/
DRealBufferedSource.kt82 val read = source.read(buffer, Segment.SIZE.toLong()) in buffer()
147 val count = source.read(buffer, Segment.SIZE.toLong()) in readUtf8Line()
155 checkOffsetAndCount(data.size.toLong(), offset.toLong(), byteCount.toLong()) in readUtf8Line()
158 val count = source.read(buffer, Segment.SIZE.toLong()) in readUtf8Line()
/external/guava/android/guava/src/com/google/common/primitives/
DUnsignedInts.java79 public static long toLong(int value) { in toLong() method in UnsignedInts
282 return (int) (toLong(dividend) / toLong(divisor)); in divide()
296 return (int) (toLong(dividend) % toLong(divisor)); in remainder()
/external/guava/guava/src/com/google/common/primitives/
DUnsignedInts.java79 public static long toLong(int value) { in toLong() method in UnsignedInts
282 return (int) (toLong(dividend) / toLong(divisor)); in divide()
296 return (int) (toLong(dividend) % toLong(divisor)); in remainder()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/flow/
DSharedFlowStressTest.kt50 var cur = producerIndex.toLong() in <lambda>()
62 .dropWhile { it % nConsumers != consumerIndex.toLong() } in <lambda>()
65 check(it % nConsumers == consumerIndex.toLong()) in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/scheduling/
DBlockingCoroutineDispatcherTerminationStressTest.kt30 Thread.sleep(rnd.nextInt(30).toLong()) in testTermination()
33 Thread.sleep(rnd.nextInt(5).toLong()) in testTermination()

12345