/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | BitSetTest.java | 29 BitSet bs = new BitSet(); in test_Constructor() local 31 assertEquals("Created BitSet of incorrect size", 64, bs.size()); in test_Constructor() 32 assertEquals("New BitSet had invalid string representation", "{}", bs in test_Constructor() 37 BitSet bs = new BitSet(128); in test_ConstructorI() local 40 assertEquals("Created BitSet of incorrect size", 128, bs.size()); in test_ConstructorI() 42 + bs.toString(), "{}", bs.toString()); in test_ConstructorI() 46 bs = new BitSet(89); in test_ConstructorI() 47 assertEquals("Failed to round BitSet element size", 128, bs.size()); in test_ConstructorI() 50 bs = new BitSet(-9); in test_ConstructorI() 57 BitSet bs = (BitSet) eightbs.clone(); in test_clone() local [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | BitSetTest.java | 28 BitSet bs = new BitSet(); in test_toString() local 29 assertEquals("{}", bs.toString()); in test_toString() 30 bs.set(2); in test_toString() 31 assertEquals("{2}", bs.toString()); in test_toString() 32 bs.set(4); in test_toString() 33 bs.set(10); in test_toString() 34 assertEquals("{2, 4, 10}", bs.toString()); in test_toString() 53 private static void assertBitSet(BitSet bs, long[] longs, String s) { in assertBitSet() argument 55 assertEquals(bs.toString(), ((longs[i / 64] & (1L << (i % 64))) != 0), bs.get(i)); in assertBitSet() 62 assertFalse(bs.isEmpty()); in assertBitSet() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | BitSetBenchmark.java | 27 private BitSet bs; field in BitSetBenchmark 31 bs = new BitSet(size); in setUp() 36 if (!bs.isEmpty()) throw new RuntimeException(); in timeIsEmptyTrue() 41 bs.set(bs.size() - 1); in timeIsEmptyFalse() 43 if (bs.isEmpty()) throw new RuntimeException(); in timeIsEmptyFalse() 49 bs.get(i % size); in timeGet() 55 bs.clear(i % size); in timeClear() 61 bs.set(i % size); in timeSet() 67 bs.set(i % size, true); in timeSetOn() 73 bs.set(i % size, false); in timeSetOff()
|
/libcore/ojluni/src/main/java/java/nio/channels/ |
D | Channels.java | 149 private byte[] bs = null; // Invoker's previous array in newOutputStream() 159 public synchronized void write(byte[] bs, int off, int len) in newOutputStream() argument 162 if ((off < 0) || (off > bs.length) || (len < 0) || in newOutputStream() 163 ((off + len) > bs.length) || ((off + len) < 0)) { in newOutputStream() 168 ByteBuffer bb = ((this.bs == bs) in newOutputStream() 170 : ByteBuffer.wrap(bs)); in newOutputStream() 174 this.bs = bs; in newOutputStream() 205 private byte[] bs = null; // Invoker's previous array in newInputStream() 219 public synchronized int read(byte[] bs, int off, int len) in newInputStream() argument 222 if ((off < 0) || (off > bs.length) || (len < 0) || in newInputStream() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | ChannelInputStream.java | 78 private byte[] bs = null; // Invoker's previous array field in ChannelInputStream 94 public synchronized int read(byte[] bs, int off, int len) in read() argument 97 if ((off < 0) || (off > bs.length) || (len < 0) || in read() 98 ((off + len) > bs.length) || ((off + len) < 0)) { in read() 103 ByteBuffer bb = ((this.bs == bs) in read() 105 : ByteBuffer.wrap(bs)); in read() 109 this.bs = bs; in read()
|
D | Util.java | 221 static ByteBuffer[] subsequence(ByteBuffer[] bs, int offset, int length) { in subsequence() argument 222 if ((offset == 0) && (length == bs.length)) in subsequence() 223 return bs; in subsequence() 227 bs2[i] = bs[offset + i]; in subsequence()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentSkipListSetTest.java | 673 BitSet bs = new BitSet(setSize); in testRecursiveSubSets() local 675 populate(set, setSize, bs); in testRecursiveSubSets() 676 check(set, 0, setSize - 1, true, bs); in testRecursiveSubSets() 677 check(set.descendingSet(), 0, setSize - 1, false, bs); in testRecursiveSubSets() local 679 mutateSet(set, 0, setSize - 1, bs); in testRecursiveSubSets() 680 check(set, 0, setSize - 1, true, bs); in testRecursiveSubSets() 681 check(set.descendingSet(), 0, setSize - 1, false, bs); in testRecursiveSubSets() local 684 0, setSize - 1, true, bs); in testRecursiveSubSets() 705 void populate(NavigableSet<Integer> set, int limit, BitSet bs) { in populate() argument 708 put(set, element, bs); in populate() [all …]
|
D | TreeSetTest.java | 667 BitSet bs; field in TreeSetTest 677 bs = new BitSet(setSize); in testRecursiveSubSets() 728 bs.clear(it.next()); in mutateSet() 753 bs.clear(it.next()); in mutateSubSet() 774 bs.set(element); in put() 779 bs.clear(element); in remove() 899 if (bs.get(element)) in check() 910 int result = bs.nextSetBit(element); in check() 930 boolean bsContainsI = bs.get(i); in check() 941 assertTrue(bs.get(element)); in check()
|
D | TreeMapTest.java | 785 BitSet bs; 794 bs = new BitSet(mapSize); 835 bs.clear(it.next()); 860 bs.clear(it.next()); 881 bs.set(key); 886 bs.clear(key); 1002 if (bs.get(key)) 1013 int result = bs.nextSetBit(key); 1033 boolean bsContainsI = bs.get(i); 1044 assertTrue(bs.get(key));
|
D | ConcurrentSkipListMapTest.java | 980 BitSet bs; 989 bs = new BitSet(mapSize); 1030 bs.clear(it.next()); 1055 bs.clear(it.next()); 1076 bs.set(key); 1081 bs.clear(key); 1197 if (bs.get(key)) 1208 int result = bs.nextSetBit(key); 1228 boolean bsContainsI = bs.get(i); 1239 assertTrue(bs.get(key));
|
D | ConcurrentHashMapTest.java | 145 BS bs = new BS(String.valueOf(i)); in testGenericComparable() local 147 LexicographicList<BS> bss = new LexicographicList<BS>(bs); in testGenericComparable()
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | AdjacencyList.java | 213 BuildStep bs = new BuildStep(v, BuildStep.FOLLOW); in buildList() local 214 mStepList.add(bs); in buildList() 215 success = buildList(theList, v.getIndex(), bs); in buildList()
|
/libcore/support/src/test/java/tests/security/ |
D | AlgorithmParameterAsymmetricHelper.java | 49 byte[] bs = cipher.doFinal(plainData.getBytes()); in test() 52 byte[] decrypted = cipher.doFinal(bs); in test()
|
D | AlgorithmParameterSymmetricHelper.java | 63 byte[] bs = cipher.doFinal(plainData.getBytes()); in test() 66 byte[] decrypted = cipher.doFinal(bs); in test()
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | OldZipFileTest.java | 32 ByteArrayOutputStream bs = new ByteArrayOutputStream(); in getAllBytesFromStream() local 36 bs.write(buf, 0, iRead); in getAllBytesFromStream() 38 return bs.toByteArray(); in getAllBytesFromStream()
|
/libcore/ojluni/src/main/java/com/sun/security/cert/internal/x509/ |
D | X509V1CertImpl.java | 81 ByteArrayInputStream bs; in X509V1CertImpl() local 83 bs = new ByteArrayInputStream(certData); in X509V1CertImpl() 85 getFactory().generateCertificate(bs); in X509V1CertImpl()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | FileInputStreamTest.java | 473 byte[] bs = new byte[10]; in test_getChannel() 474 r = fis.read(bs); in test_getChannel() 480 bs = new byte[10]; in test_getChannel() 483 r = fis.read(bs); in test_getChannel()
|
D | SerializationStressTest3.java | 1612 BitSet bs = new BitSet(64); in test_18_127_writeObject() local 1613 bs.set(1); in test_18_127_writeObject() 1614 bs.set(10); in test_18_127_writeObject() 1615 bs.set(100); in test_18_127_writeObject() 1616 bs.set(1000); in test_18_127_writeObject() 1617 objToSave = bs; in test_18_127_writeObject() 1621 assertTrue(MSG_TEST_FAILED + objToSave, bs.equals(objLoaded)); in test_18_127_writeObject()
|
D | OutputStreamWriterTest.java | 426 byte[] bs = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' }; in testHandleEarlyEOFChar_2() 428 bytes[i] = bs[i / 8192]; in testHandleEarlyEOFChar_2()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldFileWriterTest.java | 120 byte[] bs = { in test_handleEarlyEOFChar_2() 124 bytes[i] = bs[i / 8192]; in test_handleEarlyEOFChar_2()
|
/libcore/support/src/test/java/tests/resources/x509/ |
D | privkey.pem | 22 bs+oiq7MxzTuCUUo6vWfYNoMYTxqd9rDCtMfw9vG+3wCLfOywbjgcygYa9R+cJwY
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | GroupByOpTest.java | 166 Set<V> bs = new HashSet<>(b.get(k)); in multiMapEquals() local 167 if (!Objects.equals(as, bs)) { in multiMapEquals()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | InetAddressTest.java | 347 byte[] bs = new byte[16]; in test_equals() 348 assertEquals(Inet6Address.getByAddress("1", bs, 1), Inet6Address.getByAddress("2", bs, 2)); in test_equals()
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
D | CipherTest.java | 4284 int bs = createAesCipher(opmode).getBlockSize(); in checkCipher_DoFinal_invalidMode_Failure() local 4285 assertEquals(16, bs); // check test is set up correctly in checkCipher_DoFinal_invalidMode_Failure() 4299 createAesCipher(opmode).doFinal(new byte[2 * bs], 0, bs); in checkCipher_DoFinal_invalidMode_Failure() 4305 createAesCipher(opmode).doFinal(new byte[2 * bs], 0, bs, new byte[2 * bs], 0); in checkCipher_DoFinal_invalidMode_Failure() 4325 int bs = createAesCipher(opmode).getBlockSize(); in checkCipher_Update_invalidMode_Failure() local 4326 assertEquals(16, bs); // check test is set up correctly in checkCipher_Update_invalidMode_Failure() 4328 assertIllegalStateException(msg, () -> createAesCipher(opmode).update(new byte[2 * bs])); in checkCipher_Update_invalidMode_Failure() 4330 new byte[2 * bs] /* input */, bs /* inputOffset */, 0 /* inputLen */)); in checkCipher_Update_invalidMode_Failure() 4332 createAesCipher(opmode).update(new byte[2*bs] /* input */, 0 /* inputOffset */, in checkCipher_Update_invalidMode_Failure() 4333 2 * bs /* inputLen */, new byte[2 * bs] /* output */, 0 /* outputOffset */); in checkCipher_Update_invalidMode_Failure()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/ |
D | JarFileTest.java | 65 ByteArrayOutputStream bs = new ByteArrayOutputStream(); in getAllBytesFromStream() local 71 if (iRead > 0) bs.write(buf, 0, iRead); in getAllBytesFromStream() 73 return bs.toByteArray(); in getAllBytesFromStream()
|