Home
last modified time | relevance | path

Searched refs:ai (Results 1 – 19 of 19) sorted by relevance

/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicIntegerTest.java35 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 …]
DAtomicLongTest.java37 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 …]
DAtomicBooleanTest.java39 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 …]
DLongAdderTest.java32 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 …]
DAtomicMarkableReferenceTest.java31 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 …]
DAtomicStampedReferenceTest.java31 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 …]
DAtomicReferenceTest.java31 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 …]
DDoubleAccumulatorTest.java32 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 …]
DLongAccumulatorTest.java32 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 …]
DDoubleAdderTest.java32 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/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/
DAttributeListImplTest.java45 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 …]
DAttributesImplTest.java50 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/stream/test/org/openjdk/tests/java/util/stream/
DIntPrimitiveOpsTests.java72 AtomicInteger ai = new AtomicInteger(0); in testParForEach() local
73 IntStream.range(1, 10).parallel().filter(i -> i % 2 == 0).forEach(ai::addAndGet); in testParForEach()
74 assertEquals(ai.get(), 20); in testParForEach()
DLongPrimitiveOpsTests.java72 AtomicLong ai = new AtomicLong(0); in testParForEach() local
73 LongStream.range(1, 10).parallel().filter(i -> i % 2 == 0).forEach(ai::addAndGet); in testParForEach()
74 assertEquals(ai.get(), 20); in testParForEach()
DIntSliceOpTest.java191 AtomicInteger ai = new AtomicInteger(); in testLimitShortCircuit() local
193 .peek(i -> ai.getAndIncrement()) in testLimitShortCircuit()
196 assertEquals(ai.get(), l, "tee block was called too many times"); in testLimitShortCircuit()
DSliceOpTest.java327 AtomicInteger ai = new AtomicInteger();
329 .peek(i -> ai.getAndIncrement())
332 assertEquals(ai.get(), l, "tee block was called too many times");
/libcore/ojluni/src/main/java/java/util/
DDualPivotQuicksort.java226 int ai = a[i + 1]; in sort() local
227 while (ai < a[j]) { in sort()
233 a[j + 1] = ai; in sort()
674 long ai = a[i + 1]; in sort() local
675 while (ai < a[j]) { in sort()
681 a[j + 1] = ai; in sort()
1158 short ai = a[i + 1]; in sort() local
1159 while (ai < a[j]) { in sort()
1165 a[j + 1] = ai; in sort()
1642 char ai = a[i + 1]; in sort() local
[all …]
/libcore/luni/src/main/native/
Dlibcore_io_Linux.cpp1352 for (addrinfo* ai = addressList; ai != NULL; ai = ai->ai_next) { in Linux_android_getaddrinfo() local
1353 if (ai->ai_family == AF_INET || ai->ai_family == AF_INET6) { in Linux_android_getaddrinfo()
1356 ALOGE("android_getaddrinfo unexpected ai_family %i", ai->ai_family); in Linux_android_getaddrinfo()
1371 for (addrinfo* ai = addressList; ai != NULL; ai = ai->ai_next) { in Linux_android_getaddrinfo() local
1372 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) { in Linux_android_getaddrinfo()
1374 ALOGE("android_getaddrinfo unexpected ai_family %i", ai->ai_family); in Linux_android_getaddrinfo()
1379 sockaddr_storage& address = *reinterpret_cast<sockaddr_storage*>(ai->ai_addr); in Linux_android_getaddrinfo()
/libcore/luni/src/main/java/libcore/net/
Dmime.types109 application/postscript ps ai eps epsi epsf eps2 eps3