Home
last modified time | relevance | path

Searched refs:b1 (Results 1 – 25 of 33) sorted by relevance

12

/libcore/ojluni/src/test/java/util/BitSet/
DBSMethods.java157 BitSet b1 = new BitSet(); in testFlipTime() local
158 b1.set(1000); in testFlipTime()
161 b1.flip(100, 900); in testFlipTime()
169 b1.flip(2, 44); in testFlipTime()
351 BitSet b1 = new BitSet(256); in testAndNot() local
357 b1.set(generator.nextInt(255)); in testAndNot()
364 BitSet b3 = (BitSet)b1.clone(); in testAndNot()
369 boolean bit1 = b1.get(x); in testAndNot()
375 checkSanity(b1, b2, b3); in testAndNot()
385 BitSet b1 = new BitSet(256); in testAnd() local
[all …]
DImportExport.java115 LongBuffer b1 = LongBuffer.wrap(longs); in test() local
125 BitSet s2 = BitSet.valueOf(b1); in test()
136 equal(s2.get(i), ((b1.get(i/64) & (1L<<(i%64))) != 0)); in test()
/libcore/ojluni/src/test/java/math/BigDecimal/
DAddTests.java88 private static void addWithoutException(BigDecimal b1, BigDecimal b2, MathContext mc) { in addWithoutException() argument
93 BigDecimal sum = b1.add(b2, mc); in addWithoutException()
195 private static void roundAway(BigDecimal b1, BigDecimal b2) { in roundAway() argument
196 b1.precision(); in roundAway()
199 BigDecimal b1_negate = b1.negate(); in roundAway()
205 roundAway1(b1, b2); in roundAway()
206 roundAway1(b1, b2_negate); in roundAway()
211 private static void roundAway1(BigDecimal b1, BigDecimal b2) { in roundAway1() argument
212 roundAway0(b1, b2); in roundAway1()
213 roundAway0(b2, b1); in roundAway1()
[all …]
/libcore/ojluni/src/main/java/java/nio/channels/
DChannels.java146 private byte[] b1; in newOutputStream()
150 if (b1 == null) in newOutputStream()
151 b1 = new byte[1]; in newOutputStream()
152 b1[0] = (byte) b; in newOutputStream()
153 this.write(b1); in newOutputStream()
205 private byte[] b1; in newInputStream()
209 if (b1 == null) in newInputStream()
210 b1 = new byte[1]; in newInputStream()
211 int n = this.read(b1); in newInputStream()
213 return b1[0] & 0xff; in newInputStream()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DCipherTest.java426 byte[] b1 = new byte[30]; in test_doFinal()
431 c.update(b, 0, 10, b1, 5); in test_doFinal()
447 int len = c.doFinal(b, 0, 16, b1, 0); in test_doFinal()
454 c.update(b1, 0, 24, b, 0); in test_doFinal()
487 byte[] b1 = new byte[6]; in testUpdatebyteArrayintintbyteArrayint()
491 c.update(b, 0, 10, b1, 5); in testUpdatebyteArrayintintbyteArrayint()
498 c.update(b, 0, 10, b1, 5); in testUpdatebyteArrayintintbyteArrayint()
503 b1 = new byte[30]; in testUpdatebyteArrayintintbyteArrayint()
504 c.update(b, 0, 10, b1, 5); in testUpdatebyteArrayintintbyteArrayint()
512 byte[] b1 = new byte[30]; in testDoFinalbyteArrayintintbyteArrayint()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DEqualsHashCodeBenchmark.java45 Object b1; field in EqualsHashCodeBenchmark
55 b1 = type.newInstance("http://developer.android.com/reference/java/net/URI.html"); in setUp()
65 a1.equals(b1); in timeEquals()
67 b1.equals(b2); in timeEquals()
74 b1.hashCode(); in timeHashCode()
/libcore/ojluni/src/main/java/sun/security/pkcs/
DPKCS8Key.java413 byte[] b1; in equals()
415 b1 = encodedKey; in equals()
417 b1 = getEncoded(); in equals()
425 if (b1.length != b2.length) in equals()
427 for (i = 0; i < b1.length; i++) { in equals()
428 if (b1[i] != b2[i]) { in equals()
444 byte[] b1 = getEncoded(); in hashCode()
446 for (int i = 1; i < b1.length; i++) { in hashCode()
447 retval += b1[i] * i; in hashCode()
/libcore/ojluni/src/test/java/io/Serializable/records/
DStreamRefTest.java85 B b1 = (B)deserializeOne(bytes); in basicRef() local
90 assertTrue(a1 == b1.a); in basicRef()
91 assertTrue(b1 == c1.b); in basicRef()
107 B b1 = (B)deserializeOne(bytes); in reverseBasicRef() local
110 assertTrue(a1 == b1.a); in reverseBasicRef()
111 assertTrue(b1 == c1.b); in reverseBasicRef()
136 B b1 = (B)deserializeOne(byteStream); in basicRefWithInvalidA() local
137 assertEquals(b1.a, null); in basicRefWithInvalidA()
/libcore/ojluni/src/main/java/sun/nio/ch/
DChannelInputStream.java73 private byte[] b1 = null; field in ChannelInputStream
80 if (b1 == null) in read()
81 b1 = new byte[1]; in read()
82 int n = this.read(b1); in read()
84 return b1[0] & 0xff; in read()
/libcore/ojluni/src/test/java/util/Optional/
DBasicInt.java80 var b1 = new AtomicBoolean(false); in checkEmpty() local
84 OptionalInt_ifPresentOrElse(empty, s -> b1.set(true), () -> b2.set(true)); in checkEmpty()
85 assertFalse(b1.get()); in checkEmpty()
121 var b1 = new AtomicBoolean(false); in checkPresent() local
125 OptionalInt_ifPresentOrElse(opt, s -> b1.set(true), () -> b2.set(true)); in checkPresent()
126 assertTrue(b1.get()); in checkPresent()
DBasicDouble.java79 var b1 = new AtomicBoolean(false); in checkEmpty() local
83 OptionalDouble_ifPresentOrElse(empty, s -> b1.set(true), () -> b2.set(true)); in checkEmpty()
84 assertFalse(b1.get()); in checkEmpty()
121 var b1 = new AtomicBoolean(false); in checkPresent() local
125 OptionalDouble_ifPresentOrElse(opt, s -> b1.set(true), () -> b2.set(true)); in checkPresent()
126 assertTrue(b1.get()); in checkPresent()
DBasicLong.java79 var b1 = new AtomicBoolean(false); in checkEmpty() local
83 OptionalLong_ifPresentOrElse(empty, s -> b1.set(true), () -> b2.set(true)); in checkEmpty()
84 assertFalse(b1.get()); in checkEmpty()
121 var b1 = new AtomicBoolean(false); in checkPresent() local
125 OptionalLong_ifPresentOrElse(opt, s -> b1.set(true), () -> b2.set(true)); in checkPresent()
126 assertTrue(b1.get()); in checkPresent()
DBasic.java84 var b1 = new AtomicBoolean(false); in checkEmpty() local
88 Optional_ifPresentOrElse(empty, s -> b1.set(true), () -> b2.set(true)); in checkEmpty()
89 assertFalse(b1.get()); in checkEmpty()
126 var b1 = new AtomicBoolean(false); in checkPresent() local
130 Optional_ifPresentOrElse(opt, s -> b1.set(true), () -> b2.set(true)); in checkPresent()
131 assertTrue(b1.get()); in checkPresent()
/libcore/ojluni/src/main/java/java/util/
DBase64.java464 int b1 = src[sp++] & 0xff; in encode0() local
465 dst[dp++] = (byte)base64[(b0 << 4) & 0x3f | (b1 >> 4)]; in encode0()
466 dst[dp++] = (byte)base64[(b1 << 2) & 0x3f]; in encode0()
792 int b1 = base64[src[sp++] & 0xff]; in decodeBlock() local
796 if ((b1 | b2 | b3 | b4) < 0) { // non base64 byte in decodeBlock()
799 int bits0 = b1 << 18 | b2 << 12 | b3 << 6 | b4; in decodeBlock()
890 private int b0, b1, b2; field in Base64.EncOutputStream
924 private void writeb4(char b1, char b2, char b3, char b4) throws IOException { in writeb4() argument
925 buf[0] = (byte)b1; in writeb4()
942 b1 = b[off++] & 0xff; in write()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DMessageDigest1Test.java200 byte[] b1 = { 1, 2, 3, 4 }; in test_isEqualLB$LB$()
205 assertTrue(MessageDigest.isEqual(b1, b4)); in test_isEqualLB$LB$()
206 assertFalse(MessageDigest.isEqual(b1, b2)); in test_isEqualLB$LB$()
207 assertFalse(MessageDigest.isEqual(b1, b3)); in test_isEqualLB$LB$()
/libcore/ojluni/src/test/java/text/BreakIterator/
DExceptionTest.java121 private static void check(boolean b1, boolean b2) { in check() argument
122 if (b1 != b2) { in check()
123 throw new RuntimeException(b1 + " != " + b2); in check()
/libcore/ojluni/src/test/java/io/ByteArrayOutputStream/
DWrite.java112 byte[] b1 = baos.toByteArray(); in writeTest()
113 assertEquals(b1.length, len1, "Array length test 1 failed."); in writeTest()
114 assertEquals(b1, Arrays.copyOfRange(b, off1, off1 + len1), in writeTest()
/libcore/ojluni/src/main/java/sun/security/x509/
DX509Key.java455 byte[] b1 = getEncodedInternal(); in hashCode()
456 int r = b1.length; in hashCode()
457 for (int i = 0; i < b1.length; i++) { in hashCode()
458 r += (b1[i] & 0xff) * 37; in hashCode()
/libcore/ojluni/src/main/java/java/nio/
DBits.java67 static private char makeChar(byte b1, byte b0) { in makeChar() argument
68 return (char)((b1 << 8) | (b0 & 0xff)); in makeChar()
139 static private short makeShort(byte b1, byte b0) { in makeShort() argument
140 return (short)((b1 << 8) | (b0 & 0xff)); in makeShort()
211 static private int makeInt(byte b3, byte b2, byte b1, byte b0) { in makeInt() argument
214 ((b1 & 0xff) << 8) | in makeInt()
305 byte b3, byte b2, byte b1, byte b0) in makeLong() argument
313 (((long)b1 & 0xff) << 8) | in makeLong()
/libcore/ojluni/src/test/java/math/BigInteger/
DBigIntegerTest.java943 BigInteger b1 = new BigInteger(bitPattern, 16); in serialize() local
948 oos.writeObject(b1); in serialize()
957 Assert.assertEquals(b1, b2, "Serialized failed for hex " + b1.toString(16)); in serialize()
958 Assert.assertEquals(b1.or(b2), b1, "Serialized failed for hex " + b1.toString(16)); in serialize() local
963 BigInteger b1 = fetchNumber(random.nextInt(100)); in serialize() local
968 oos.writeObject(b1); in serialize()
979 Assert.assertEquals(b1, b2, "Serialized failed for hex " + b1.toString(16)); in serialize()
980 Assert.assertEquals(b1.or(b2), b1, "Serialized failed for hex " + b1.toString(16)); in serialize() local
DUnicodeConstructor.java48 BigInteger b1 = new BigInteger("\uff10"); in testUnicodeConstructor() local
/libcore/luni/src/test/java/tests/support/
DSupport_SQL.java91 public static boolean isEqual(byte[] b1, int off1, byte[] b2, int off2, in isEqual() argument
94 if (b1[i + off1] != b2[i + off2]) in isEqual()
/libcore/ojluni/src/test/java/lang/invoke/
DFoldTest.java111 static int str(boolean b1, String s, boolean b2, int x) { in str() argument
112 return b1 && s.equals(String.valueOf(b2)) ? x : -x; in str()
/libcore/luni/src/test/java/libcore/java/nio/
DBufferTest.java929 ByteBuffer b1 = ByteBuffer.allocateDirect(1); in testFreed() local
930 ByteBuffer b2 = b1.duplicate(); in testFreed()
931 NioUtils.freeDirectBuffer(b1); in testFreed()
932 for (ByteBuffer b: new ByteBuffer[] { b1, b2 }) { in testFreed()
952 ByteBuffer b1 = ByteBuffer.allocate(1); in testAccess() local
953 ByteBuffer b2 = b1.duplicate(); in testAccess()
954 for (ByteBuffer b: new ByteBuffer[] { b1, b2 }) { in testAccess()
966 b1 = ByteBuffer.allocateDirect(8); in testAccess()
967 b2 = b1.duplicate(); in testAccess()
968 b1.setAccessible(false); in testAccess()
[all …]
/libcore/ojluni/src/main/java/java/math/
DMutableBigInteger.java275 int b1 = value[i] + 0x80000000; in compare() local
277 if (b1 < b2) in compare()
279 if (b1 > b2) in compare()
301 int b1 = value[i] + 0x80000000; in compareShifted() local
303 if (b1 < b2) in compareShifted()
305 if (b1 > b2) in compareShifted()
1359 MutableBigInteger b1 = new MutableBigInteger(b); in divide3n2n() local
1360 b1.safeRightShift(n * 32); in divide3n2n()
1367 r = a12.divide2n1n(b1, quotient); in divide3n2n()
1374 a12.add(b1); in divide3n2n()
[all …]

12