Home
last modified time | relevance | path

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

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DBitSetTest.java29 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/
DBitSetTest.java28 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/
DBitSetBenchmark.java27 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/
DChannels.java149 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/
DChannelInputStream.java78 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()
DUtil.java221 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/
DConcurrentSkipListSetTest.java673 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 …]
DTreeSetTest.java667 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()
DTreeMapTest.java785 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));
DConcurrentSkipListMapTest.java980 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));
DConcurrentHashMapTest.java145 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/
DAdjacencyList.java213 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/
DAlgorithmParameterAsymmetricHelper.java49 byte[] bs = cipher.doFinal(plainData.getBytes()); in test()
52 byte[] decrypted = cipher.doFinal(bs); in test()
DAlgorithmParameterSymmetricHelper.java63 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/
DOldZipFileTest.java32 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/
DX509V1CertImpl.java81 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/
DFileInputStreamTest.java473 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()
DSerializationStressTest3.java1612 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()
DOutputStreamWriterTest.java426 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/
DOldFileWriterTest.java120 byte[] bs = { in test_handleEarlyEOFChar_2()
124 bytes[i] = bs[i / 8192]; in test_handleEarlyEOFChar_2()
/libcore/support/src/test/java/tests/resources/x509/
Dprivkey.pem22 bs+oiq7MxzTuCUUo6vWfYNoMYTxqd9rDCtMfw9vG+3wCLfOywbjgcygYa9R+cJwY
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DGroupByOpTest.java166 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/
DInetAddressTest.java347 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/
DCipherTest.java4284 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/
DJarFileTest.java65 ByteArrayOutputStream bs = new ByteArrayOutputStream(); in getAllBytesFromStream() local
71 if (iRead > 0) bs.write(buf, 0, iRead); in getAllBytesFromStream()
73 return bs.toByteArray(); in getAllBytesFromStream()