/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 | 145 private byte[] bs; // Invoker's previous array in newOutputStream() 157 public synchronized void write(byte[] bs, int off, int len) in newOutputStream() argument 160 if ((off < 0) || (off > bs.length) || (len < 0) || in newOutputStream() 161 ((off + len) > bs.length) || ((off + len) < 0)) { in newOutputStream() 166 ByteBuffer bb = ((this.bs == bs) in newOutputStream() 168 : ByteBuffer.wrap(bs)); in newOutputStream() 172 this.bs = bs; in newOutputStream() 204 private byte[] bs; // Invoker's previous array in newInputStream() 218 public synchronized int read(byte[] bs, int off, int len) in newInputStream() argument 221 if ((off < 0) || (off > bs.length) || (len < 0) || in newInputStream() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | ChannelInputStream.java | 72 private byte[] bs = null; // Invoker's previous array field in ChannelInputStream 88 public synchronized int read(byte[] bs, int off, int len) in read() argument 91 Objects.checkFromIndexSize(off, len, bs.length); in read() 95 ByteBuffer bb = ((this.bs == bs) in read() 97 : ByteBuffer.wrap(bs)); in read() 101 this.bs = bs; in read()
|
D | Util.java | 305 static ByteBuffer[] subsequence(ByteBuffer[] bs, int offset, int length) { in subsequence() argument 306 if ((offset == 0) && (length == bs.length)) in subsequence() 307 return bs; in subsequence() 311 bs2[i] = bs[offset + i]; in subsequence()
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | ConcurrentSkipListSetTest.java | 703 BitSet bs = new BitSet(setSize); in testRecursiveSubSets() local 705 populate(set, setSize, bs); in testRecursiveSubSets() 706 check(set, 0, setSize - 1, true, bs); in testRecursiveSubSets() 707 check(set.descendingSet(), 0, setSize - 1, false, bs); in testRecursiveSubSets() local 709 mutateSet(set, 0, setSize - 1, bs); in testRecursiveSubSets() 710 check(set, 0, setSize - 1, true, bs); in testRecursiveSubSets() 711 check(set.descendingSet(), 0, setSize - 1, false, bs); in testRecursiveSubSets() local 714 0, setSize - 1, true, bs); in testRecursiveSubSets() 736 void populate(NavigableSet<Integer> set, int limit, BitSet bs) { in populate() argument 739 put(set, element, bs); in populate() [all …]
|
D | TreeSetTest.java | 690 BitSet bs; field in TreeSetTest 700 bs = new BitSet(setSize); in testRecursiveSubSets() 752 bs.clear(it.next()); in mutateSet() 777 bs.clear(it.next()); in mutateSubSet() 798 bs.set(element); in put() 803 bs.clear(element); in remove() 923 if (bs.get(element)) in check() 934 int result = bs.nextSetBit(element); in check() 954 boolean bsContainsI = bs.get(i); in check() 965 assertTrue(bs.get(element)); in check()
|
/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()
|
/libcore/ojluni/src/test/java/math/BigInteger/ |
D | PrimeTest.java | 85 BitSet bs = new BitSet(nbits); in createPrimes() local 88 bs.set(i - 2, true); in createPrimes() 92 } while (p > 1 && bs.get(p - 2)); in createPrimes() 94 bs.flip(0, nbits); in createPrimes() 95 return bs; in createPrimes() 105 BitSet bs = createPrimes(); in getPrimes() local 106 NavigableSet<BigInteger> primes = bs.stream() in getPrimes()
|
/libcore/ojluni/src/test/java/lang/invoke/VarHandles/ |
D | VarHandleTestByteArrayAsShort.java | 204 static void testArrayNPE(ByteArraySource bs, VarHandleSource vhs) { in testArrayNPE() argument 245 static void testArrayNPE(ByteBufferSource bs, VarHandleSource vhs) { in testArrayNPE() argument 286 static void testArrayUnsupported(ByteArraySource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 288 byte[] array = bs.s; in testArrayUnsupported() 384 static void testArrayUnsupported(ByteBufferSource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 386 ByteBuffer array = bs.s; in testArrayUnsupported() 388 boolean readOnly = MemoryMode.READ_ONLY.isSet(bs.memoryModes); in testArrayUnsupported() 594 … static void testArrayIndexOutOfBounds(ByteArraySource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument 596 byte[] array = bs.s; in testArrayIndexOutOfBounds() 639 … static void testArrayIndexOutOfBounds(ByteBufferSource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument [all …]
|
D | VarHandleTestByteArrayAsChar.java | 204 static void testArrayNPE(ByteArraySource bs, VarHandleSource vhs) { in testArrayNPE() argument 245 static void testArrayNPE(ByteBufferSource bs, VarHandleSource vhs) { in testArrayNPE() argument 286 static void testArrayUnsupported(ByteArraySource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 288 byte[] array = bs.s; in testArrayUnsupported() 384 static void testArrayUnsupported(ByteBufferSource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 386 ByteBuffer array = bs.s; in testArrayUnsupported() 388 boolean readOnly = MemoryMode.READ_ONLY.isSet(bs.memoryModes); in testArrayUnsupported() 594 … static void testArrayIndexOutOfBounds(ByteArraySource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument 596 byte[] array = bs.s; in testArrayIndexOutOfBounds() 639 … static void testArrayIndexOutOfBounds(ByteBufferSource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument [all …]
|
D | VarHandleTestByteArrayAsFloat.java | 204 static void testArrayNPE(ByteArraySource bs, VarHandleSource vhs) { in testArrayNPE() argument 288 static void testArrayNPE(ByteBufferSource bs, VarHandleSource vhs) { in testArrayNPE() argument 372 static void testArrayUnsupported(ByteArraySource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 374 byte[] array = bs.s; in testArrayUnsupported() 427 static void testArrayUnsupported(ByteBufferSource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 429 ByteBuffer array = bs.s; in testArrayUnsupported() 431 boolean readOnly = MemoryMode.READ_ONLY.isSet(bs.memoryModes); in testArrayUnsupported() 596 … static void testArrayIndexOutOfBounds(ByteArraySource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument 598 byte[] array = bs.s; in testArrayIndexOutOfBounds() 685 … static void testArrayIndexOutOfBounds(ByteBufferSource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument [all …]
|
D | VarHandleTestByteArrayAsDouble.java | 204 static void testArrayNPE(ByteArraySource bs, VarHandleSource vhs) { in testArrayNPE() argument 288 static void testArrayNPE(ByteBufferSource bs, VarHandleSource vhs) { in testArrayNPE() argument 372 static void testArrayUnsupported(ByteArraySource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 374 byte[] array = bs.s; in testArrayUnsupported() 427 static void testArrayUnsupported(ByteBufferSource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 429 ByteBuffer array = bs.s; in testArrayUnsupported() 431 boolean readOnly = MemoryMode.READ_ONLY.isSet(bs.memoryModes); in testArrayUnsupported() 596 … static void testArrayIndexOutOfBounds(ByteArraySource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument 598 byte[] array = bs.s; in testArrayIndexOutOfBounds() 685 … static void testArrayIndexOutOfBounds(ByteBufferSource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument [all …]
|
D | VarHandleBaseByteArrayTest.java | 180 final ByteArrayViewSource<?> bs; field in VarHandleBaseByteArrayTest.VarHandleSourceAccessTestCase 183 …VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessT… in VarHandleSourceAccessTestCase() argument 184 this(desc, bs, vhs, ata, true); in VarHandleSourceAccessTestCase() 187 …VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessT… in VarHandleSourceAccessTestCase() argument 188 super(vhs + " -> " + bs + " " + desc, ata, loop); in VarHandleSourceAccessTestCase() 189 this.bs = bs; in VarHandleSourceAccessTestCase()
|
D | VarHandleTestByteArrayAsLong.java | 204 static void testArrayNPE(ByteArraySource bs, VarHandleSource vhs) { in testArrayNPE() argument 334 static void testArrayNPE(ByteBufferSource bs, VarHandleSource vhs) { in testArrayNPE() argument 464 static void testArrayUnsupported(ByteArraySource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 466 byte[] array = bs.s; in testArrayUnsupported() 473 static void testArrayUnsupported(ByteBufferSource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 475 ByteBuffer array = bs.s; in testArrayUnsupported() 477 boolean readOnly = MemoryMode.READ_ONLY.isSet(bs.memoryModes); in testArrayUnsupported() 596 … static void testArrayIndexOutOfBounds(ByteArraySource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument 598 byte[] array = bs.s; in testArrayIndexOutOfBounds() 731 … static void testArrayIndexOutOfBounds(ByteBufferSource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument [all …]
|
D | VarHandleTestByteArrayAsInt.java | 204 static void testArrayNPE(ByteArraySource bs, VarHandleSource vhs) { in testArrayNPE() argument 334 static void testArrayNPE(ByteBufferSource bs, VarHandleSource vhs) { in testArrayNPE() argument 464 static void testArrayUnsupported(ByteArraySource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 466 byte[] array = bs.s; in testArrayUnsupported() 473 static void testArrayUnsupported(ByteBufferSource bs, VarHandleSource vhs) { in testArrayUnsupported() argument 475 ByteBuffer array = bs.s; in testArrayUnsupported() 477 boolean readOnly = MemoryMode.READ_ONLY.isSet(bs.memoryModes); in testArrayUnsupported() 596 … static void testArrayIndexOutOfBounds(ByteArraySource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument 598 byte[] array = bs.s; in testArrayIndexOutOfBounds() 731 … static void testArrayIndexOutOfBounds(ByteBufferSource bs, VarHandleSource vhs) throws Throwable { in testArrayIndexOutOfBounds() argument [all …]
|
/libcore/ojluni/src/test/java/util/BitSet/stream/ |
D | BitSetStreamTest.java | 114 BitSet bs = data.collect(BitSet::new, BitSet::set, BitSet::or); in testBitsetStream() local 116 assertEquals(bs.cardinality(), bs.stream().count()); in testBitsetStream() 119 bs.stream().forEach(i -> { in testBitsetStream() 121 indexHolder[0] = bs.nextSetBit(ei + 1); in testBitsetStream() 125 PrimitiveIterator.OfInt it = bs.stream().iterator(); in testBitsetStream() 126 for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) { in testBitsetStream()
|
/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/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/test/java/nio/Buffer/ |
D | EqualsCompareTest.java | 644 B bs = bLength != s in testBufferType() local 648 boolean eq = bt.pairWiseEquals(as, bs); in testBufferType() 649 Assert.assertEquals(bt.equals(as, bs), eq); in testBufferType() 650 Assert.assertEquals(bt.equals(bs, as), eq); in testBufferType() 652 Assert.assertEquals(bt.compare(as, bs), 0); in testBufferType() 653 Assert.assertEquals(bt.compare(bs, as), 0); in testBufferType() 656 Assert.assertEquals(bt.mismatch(as, bs), -1); in testBufferType() 657 Assert.assertEquals(bt.mismatch(bs, as), -1); in testBufferType() 660 int aCb = bt.compare(as, bs); in testBufferType() 661 int bCa = bt.compare(bs, as); in testBufferType() [all …]
|
/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()
|
/libcore/tools/go/certutil/ |
D | certutil.go | 135 func mustWriteFile(path string, bs []byte) { 136 if err := os.WriteFile(path, bs, 0666); err != nil {
|