/libcore/jsr166-tests/src/test/java/jsr166/ |
D | AtomicLongTest.java | 37 AtomicLong ai = new AtomicLong(1); in testConstructor() local 38 assertEquals(1, ai.get()); in testConstructor() 45 AtomicLong ai = new AtomicLong(); in testConstructor2() local 46 assertEquals(0, ai.get()); in testConstructor2() 53 AtomicLong ai = new AtomicLong(1); in testGetSet() local 54 assertEquals(1, ai.get()); in testGetSet() 55 ai.set(2); in testGetSet() 56 assertEquals(2, ai.get()); in testGetSet() 57 ai.set(-3); in testGetSet() 58 assertEquals(-3, ai.get()); in testGetSet() [all …]
|
D | AtomicIntegerTest.java | 35 AtomicInteger ai = new AtomicInteger(1); in testConstructor() local 36 assertEquals(1, ai.get()); in testConstructor() 43 AtomicInteger ai = new AtomicInteger(); in testConstructor2() local 44 assertEquals(0, ai.get()); in testConstructor2() 51 AtomicInteger ai = new AtomicInteger(1); in testGetSet() local 52 assertEquals(1, ai.get()); in testGetSet() 53 ai.set(2); in testGetSet() 54 assertEquals(2, ai.get()); in testGetSet() 55 ai.set(-3); in testGetSet() 56 assertEquals(-3, ai.get()); in testGetSet() [all …]
|
D | AtomicBooleanTest.java | 39 AtomicBoolean ai = new AtomicBoolean(); in testConstructor2() local 40 assertFalse(ai.get()); in testConstructor2() 47 AtomicBoolean ai = new AtomicBoolean(true); in testGetSet() local 48 assertTrue(ai.get()); in testGetSet() 49 ai.set(false); in testGetSet() 50 assertFalse(ai.get()); in testGetSet() 51 ai.set(true); in testGetSet() 52 assertTrue(ai.get()); in testGetSet() 59 AtomicBoolean ai = new AtomicBoolean(true); in testGetLazySet() local 60 assertTrue(ai.get()); in testGetLazySet() [all …]
|
D | LongAdderTest.java | 32 LongAdder ai = new LongAdder(); in testConstructor() local 33 assertEquals(0, ai.sum()); in testConstructor() 40 LongAdder ai = new LongAdder(); in testAddAndSum() local 41 ai.add(2); in testAddAndSum() 42 assertEquals(2, ai.sum()); in testAddAndSum() 43 ai.add(-4); in testAddAndSum() 44 assertEquals(-2, ai.sum()); in testAddAndSum() 51 LongAdder ai = new LongAdder(); in testDecrementAndsum() local 52 ai.decrement(); in testDecrementAndsum() 53 assertEquals(-1, ai.sum()); in testDecrementAndsum() [all …]
|
D | AtomicStampedReferenceTest.java | 31 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testConstructor() local 32 assertSame(one, ai.getReference()); in testConstructor() 33 assertEquals(0, ai.getStamp()); in testConstructor() 44 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testGetSet() local 45 assertSame(one, ai.getReference()); in testGetSet() 46 assertEquals(0, ai.getStamp()); in testGetSet() 47 assertSame(one, ai.get(mark)); in testGetSet() 49 ai.set(two, 0); in testGetSet() 50 assertSame(two, ai.getReference()); in testGetSet() 51 assertEquals(0, ai.getStamp()); in testGetSet() [all …]
|
D | AtomicMarkableReferenceTest.java | 31 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testConstructor() local 32 assertSame(one, ai.getReference()); in testConstructor() 33 assertFalse(ai.isMarked()); in testConstructor() 44 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testGetSet() local 45 assertSame(one, ai.getReference()); in testGetSet() 46 assertFalse(ai.isMarked()); in testGetSet() 47 assertSame(one, ai.get(mark)); in testGetSet() 49 ai.set(two, false); in testGetSet() 50 assertSame(two, ai.getReference()); in testGetSet() 51 assertFalse(ai.isMarked()); in testGetSet() [all …]
|
D | AtomicReferenceTest.java | 31 AtomicReference ai = new AtomicReference(one); in testConstructor() local 32 assertSame(one, ai.get()); in testConstructor() 39 AtomicReference ai = new AtomicReference(); in testConstructor2() local 40 assertNull(ai.get()); in testConstructor2() 47 AtomicReference ai = new AtomicReference(one); in testGetSet() local 48 assertSame(one, ai.get()); in testGetSet() 49 ai.set(two); in testGetSet() 50 assertSame(two, ai.get()); in testGetSet() 51 ai.set(m3); in testGetSet() 52 assertSame(m3, ai.get()); in testGetSet() [all …]
|
D | LongAccumulatorTest.java | 32 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testConstructor() local 33 assertEquals(0, ai.get()); in testConstructor() 40 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testAccumulateAndGet() local 41 ai.accumulate(2); in testAccumulateAndGet() 42 assertEquals(2, ai.get()); in testAccumulateAndGet() 43 ai.accumulate(-4); in testAccumulateAndGet() 44 assertEquals(2, ai.get()); in testAccumulateAndGet() 45 ai.accumulate(4); in testAccumulateAndGet() 46 assertEquals(4, ai.get()); in testAccumulateAndGet() 53 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testReset() local [all …]
|
D | DoubleAccumulatorTest.java | 32 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testConstructor() local 33 assertEquals(0.0, ai.get()); in testConstructor() 40 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testAccumulateAndGet() local 41 ai.accumulate(2.0); in testAccumulateAndGet() 42 assertEquals(2.0, ai.get()); in testAccumulateAndGet() 43 ai.accumulate(-4.0); in testAccumulateAndGet() 44 assertEquals(2.0, ai.get()); in testAccumulateAndGet() 45 ai.accumulate(4.0); in testAccumulateAndGet() 46 assertEquals(4.0, ai.get()); in testAccumulateAndGet() 53 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testReset() local [all …]
|
D | DoubleAdderTest.java | 32 DoubleAdder ai = new DoubleAdder(); in testConstructor() local 33 assertEquals(0.0, ai.sum()); in testConstructor() 40 DoubleAdder ai = new DoubleAdder(); in testAddAndSum() local 41 ai.add(2.0); in testAddAndSum() 42 assertEquals(2.0, ai.sum()); in testAddAndSum() 43 ai.add(-4.0); in testAddAndSum() 44 assertEquals(-2.0, ai.sum()); in testAddAndSum() 51 DoubleAdder ai = new DoubleAdder(); in testReset() local 52 ai.add(2.0); in testReset() 53 assertEquals(2.0, ai.sum()); in testReset() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | AtomicLongTest.java | 60 AtomicLong ai = new AtomicLong(1); in testConstructor() local 61 assertEquals(1, ai.get()); in testConstructor() 68 AtomicLong ai = new AtomicLong(); in testConstructor2() local 69 assertEquals(0, ai.get()); in testConstructor2() 76 AtomicLong ai = new AtomicLong(1); in testGetSet() local 77 assertEquals(1, ai.get()); in testGetSet() 78 ai.set(2); in testGetSet() 79 assertEquals(2, ai.get()); in testGetSet() 80 ai.set(-3); in testGetSet() 81 assertEquals(-3, ai.get()); in testGetSet() [all …]
|
D | AtomicIntegerTest.java | 58 AtomicInteger ai = new AtomicInteger(1); in testConstructor() local 59 assertEquals(1, ai.get()); in testConstructor() 66 AtomicInteger ai = new AtomicInteger(); in testConstructor2() local 67 assertEquals(0, ai.get()); in testConstructor2() 74 AtomicInteger ai = new AtomicInteger(1); in testGetSet() local 75 assertEquals(1, ai.get()); in testGetSet() 76 ai.set(2); in testGetSet() 77 assertEquals(2, ai.get()); in testGetSet() 78 ai.set(-3); in testGetSet() 79 assertEquals(-3, ai.get()); in testGetSet() [all …]
|
D | AtomicBooleanTest.java | 62 AtomicBoolean ai = new AtomicBoolean(); in testConstructor2() local 63 assertFalse(ai.get()); in testConstructor2() 70 AtomicBoolean ai = new AtomicBoolean(true); in testGetSet() local 71 assertTrue(ai.get()); in testGetSet() 72 ai.set(false); in testGetSet() 73 assertFalse(ai.get()); in testGetSet() 74 ai.set(true); in testGetSet() 75 assertTrue(ai.get()); in testGetSet() 82 AtomicBoolean ai = new AtomicBoolean(true); in testGetLazySet() local 83 assertTrue(ai.get()); in testGetLazySet() [all …]
|
D | LongAdderTest.java | 55 LongAdder ai = new LongAdder(); in testConstructor() local 56 assertEquals(0, ai.sum()); in testConstructor() 63 LongAdder ai = new LongAdder(); in testAddAndSum() local 64 ai.add(2); in testAddAndSum() 65 assertEquals(2, ai.sum()); in testAddAndSum() 66 ai.add(-4); in testAddAndSum() 67 assertEquals(-2, ai.sum()); in testAddAndSum() 74 LongAdder ai = new LongAdder(); in testDecrementAndsum() local 75 ai.decrement(); in testDecrementAndsum() 76 assertEquals(-1, ai.sum()); in testDecrementAndsum() [all …]
|
D | AtomicMarkableReferenceTest.java | 54 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testConstructor() local 55 assertSame(one, ai.getReference()); in testConstructor() 56 assertFalse(ai.isMarked()); in testConstructor() 67 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testGetSet() local 68 assertSame(one, ai.getReference()); in testGetSet() 69 assertFalse(ai.isMarked()); in testGetSet() 70 assertSame(one, ai.get(mark)); in testGetSet() 72 ai.set(two, false); in testGetSet() 73 assertSame(two, ai.getReference()); in testGetSet() 74 assertFalse(ai.isMarked()); in testGetSet() [all …]
|
D | AtomicStampedReferenceTest.java | 54 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testConstructor() local 55 assertSame(one, ai.getReference()); in testConstructor() 56 assertEquals(0, ai.getStamp()); in testConstructor() 67 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testGetSet() local 68 assertSame(one, ai.getReference()); in testGetSet() 69 assertEquals(0, ai.getStamp()); in testGetSet() 70 assertSame(one, ai.get(mark)); in testGetSet() 72 ai.set(two, 0); in testGetSet() 73 assertSame(two, ai.getReference()); in testGetSet() 74 assertEquals(0, ai.getStamp()); in testGetSet() [all …]
|
D | AtomicReferenceTest.java | 54 AtomicReference ai = new AtomicReference(one); in testConstructor() local 55 assertSame(one, ai.get()); in testConstructor() 62 AtomicReference ai = new AtomicReference(); in testConstructor2() local 63 assertNull(ai.get()); in testConstructor2() 70 AtomicReference ai = new AtomicReference(one); in testGetSet() local 71 assertSame(one, ai.get()); in testGetSet() 72 ai.set(two); in testGetSet() 73 assertSame(two, ai.get()); in testGetSet() 74 ai.set(m3); in testGetSet() 75 assertSame(m3, ai.get()); in testGetSet() [all …]
|
D | DoubleAccumulatorTest.java | 55 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testConstructor() local 56 assertEquals(0.0, ai.get()); in testConstructor() 63 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testAccumulateAndGet() local 64 ai.accumulate(2.0); in testAccumulateAndGet() 65 assertEquals(2.0, ai.get()); in testAccumulateAndGet() 66 ai.accumulate(-4.0); in testAccumulateAndGet() 67 assertEquals(2.0, ai.get()); in testAccumulateAndGet() 68 ai.accumulate(4.0); in testAccumulateAndGet() 69 assertEquals(4.0, ai.get()); in testAccumulateAndGet() 76 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); in testReset() local [all …]
|
D | LongAccumulatorTest.java | 55 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testConstructor() local 56 assertEquals(0, ai.get()); in testConstructor() 63 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testAccumulateAndGet() local 64 ai.accumulate(2); in testAccumulateAndGet() 65 assertEquals(2, ai.get()); in testAccumulateAndGet() 66 ai.accumulate(-4); in testAccumulateAndGet() 67 assertEquals(2, ai.get()); in testAccumulateAndGet() 68 ai.accumulate(4); in testAccumulateAndGet() 69 assertEquals(4, ai.get()); in testAccumulateAndGet() 76 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testReset() local [all …]
|
D | DoubleAdderTest.java | 55 DoubleAdder ai = new DoubleAdder(); in testConstructor() local 56 assertEquals(0.0, ai.sum()); in testConstructor() 63 DoubleAdder ai = new DoubleAdder(); in testAddAndSum() local 64 ai.add(2.0); in testAddAndSum() 65 assertEquals(2.0, ai.sum()); in testAddAndSum() 66 ai.add(-4.0); in testAddAndSum() 67 assertEquals(-2.0, ai.sum()); in testAddAndSum() 74 DoubleAdder ai = new DoubleAdder(); in testReset() local 75 ai.add(2.0); in testReset() 76 assertEquals(2.0, ai.sum()); in testReset() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/ |
D | AttributeListImplTest.java | 45 AttributeListImpl ai = new AttributeListImpl(empty); in testAttributeListImplAttributeList() local 46 assertEquals(0, ai.getLength()); in testAttributeListImplAttributeList() 49 ai = new AttributeListImpl(multi); in testAttributeListImplAttributeList() 50 assertEquals(3, ai.getLength()); in testAttributeListImplAttributeList() 54 ai = new AttributeListImpl(null); in testAttributeListImplAttributeList() 55 assertEquals(0, ai.getLength()); in testAttributeListImplAttributeList() 134 AttributeListImpl ai = new AttributeListImpl(empty); in testGetLength() local 135 assertEquals(0, ai.getLength()); in testGetLength() 137 ai = new AttributeListImpl(multi); in testGetLength() 138 assertEquals(3, ai.getLength()); in testGetLength() [all …]
|
D | AttributesImplTest.java | 50 AttributesImpl ai = new AttributesImpl(empty); in testAttributesImplAttributes() local 51 assertEquals(0, ai.getLength()); in testAttributesImplAttributes() 54 ai = new AttributesImpl(multi); in testAttributesImplAttributes() 55 assertEquals(5, ai.getLength()); in testAttributesImplAttributes() 59 ai = new AttributesImpl(null); in testAttributesImplAttributes() 60 assertEquals(0, ai.getLength()); in testAttributesImplAttributes() 68 AttributesImpl ai = new AttributesImpl(empty); in testGetLength() local 69 assertEquals(0, ai.getLength()); in testGetLength() 71 ai = new AttributesImpl(multi); in testGetLength() 72 assertEquals(5, ai.getLength()); in testGetLength() [all …]
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | EnumerationAsIterator.java | 153 AtomicInteger ai = new AtomicInteger(); 154 i.forEachRemaining(e -> ai.getAndIncrement()); 155 assertEquals(ai.get(), exp.size()); 156 i.forEachRemaining(e -> ai.getAndIncrement()); 157 assertEquals(ai.get(), exp.size()); 173 AtomicInteger ai = new AtomicInteger(); 176 ai.getAndIncrement(); 178 i.forEachRemaining(e -> ai.getAndIncrement()); 179 assertEquals(ai.get(), exp.size()); 180 i.forEachRemaining(e -> ai.getAndIncrement()); [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | DualPivotQuicksort.java | 458 int ai = a[i = low]; in mixedInsertionSort() local 460 while (ai < a[--i]) { in mixedInsertionSort() 463 a[i + 1] = ai; in mixedInsertionSort() 479 int ai = a[i = low]; in mixedInsertionSort() local 481 if (ai < a[i - 1]) { // Small element in mixedInsertionSort() 488 while (ai < a[--i]) { in mixedInsertionSort() 491 a[i + 1] = ai; in mixedInsertionSort() 493 } else if (p > i && ai > pin) { // Large element in mixedInsertionSort() 504 ai = a[p]; in mixedInsertionSort() 511 while (ai < a[--i]) { in mixedInsertionSort() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | CountedCompleterTest.java | 46 AtomicInteger ai = new AtomicInteger(0); in chooseOne() field in CountedCompleterTest.Task 76 return Integer.valueOf(ai.intValue()); in chooseOne() 80 ai.addAndGet(val.intValue()); in chooseOne() 190 AtomicInteger ai = new AtomicInteger(0); in testHelpComplete() local 194 completeAllChildren(a, ai::addAndGet); in testHelpComplete() 195 assertEquals(n * (n + 1) / 2, ai.get()); in testHelpComplete()
|