Home
last modified time | relevance | path

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

123

/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicReferenceTest.java49 ai.set(two); in testGetSet()
50 assertSame(two, ai.get()); in testGetSet()
61 ai.lazySet(two); in testGetLazySet()
62 assertSame(two, ai.get()); in testGetLazySet()
72 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSet()
73 assertTrue(ai.compareAndSet(two, m4)); in testCompareAndSet()
89 while (!ai.compareAndSet(two, three)) in testCompareAndSetInMultipleThreads()
94 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSetInMultipleThreads()
106 do {} while (!ai.weakCompareAndSet(one, two)); in testWeakCompareAndSet()
107 do {} while (!ai.weakCompareAndSet(two, m4)); in testWeakCompareAndSet()
[all …]
DAtomicStampedReferenceTest.java49 ai.set(two, 0); in testGetSet()
50 assertSame(two, ai.getReference()); in testGetSet()
52 assertSame(two, ai.get(mark)); in testGetSet()
85 assertTrue(ai.compareAndSet(one, two, 0, 0)); in testCompareAndSet()
86 assertSame(two, ai.get(mark)); in testCompareAndSet()
89 assertTrue(ai.compareAndSet(two, m3, 0, 1)); in testCompareAndSet()
93 assertFalse(ai.compareAndSet(two, m3, 1, 1)); in testCompareAndSet()
106 while (!ai.compareAndSet(two, three, 0, 0)) in testCompareAndSetInMultipleThreads()
111 assertTrue(ai.compareAndSet(one, two, 0, 0)); in testCompareAndSetInMultipleThreads()
149 do {} while (!ai.weakCompareAndSet(one, two, 0, 0)); in testWeakCompareAndSet()
[all …]
DAtomicMarkableReferenceTest.java49 ai.set(two, false); in testGetSet()
50 assertSame(two, ai.getReference()); in testGetSet()
52 assertSame(two, ai.get(mark)); in testGetSet()
85 assertTrue(ai.compareAndSet(one, two, false, false)); in testCompareAndSet()
86 assertSame(two, ai.get(mark)); in testCompareAndSet()
89 assertTrue(ai.compareAndSet(two, m3, false, true)); in testCompareAndSet()
93 assertFalse(ai.compareAndSet(two, m3, true, true)); in testCompareAndSet()
106 while (!ai.compareAndSet(two, three, false, false)) in testCompareAndSetInMultipleThreads()
111 assertTrue(ai.compareAndSet(one, two, false, false)); in testCompareAndSetInMultipleThreads()
149 do {} while (!ai.weakCompareAndSet(one, two, false, false)); in testWeakCompareAndSet()
[all …]
DAtomicReferenceFieldUpdaterTest.java52 assertTrue(a.compareAndSet(this, one, two)); in checkCompareAndSetProtectedSub()
53 assertTrue(a.compareAndSet(this, two, m4)); in checkCompareAndSetProtectedSub()
69 assertTrue(a.compareAndSet(obj, one, two)); in checkPackageAccess()
70 assertSame(two, a.get(obj)); in checkPackageAccess()
158 a.set(this, two); in testGetSet()
159 assertSame(two, a.get(this)); in testGetSet()
172 a.lazySet(this, two); in testGetLazySet()
173 assertSame(two, a.get(this)); in testGetLazySet()
185 assertTrue(a.compareAndSet(this, one, two)); in testCompareAndSet()
186 assertTrue(a.compareAndSet(this, two, m4)); in testCompareAndSet()
[all …]
DExchangerTest.java39 assertSame(one, e.exchange(two)); in testExchange()
40 assertSame(two, e.exchange(one)); in testExchange()
44 assertSame(two, e.exchange(one)); in testExchange()
45 assertSame(one, e.exchange(two)); in testExchange()
59 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
60 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
64 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
65 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
133 assertSame(two, e.exchange(one)); in testReplacementAfterExchange()
135 e.exchange(two); in testReplacementAfterExchange()
[all …]
DAtomicReferenceArrayTest.java53 Integer[] a = { two, one, three, four, seven }; in testConstructor2()
64 Integer[] a = { two, one, three, four, seven }; in testConstructorSubClassArray()
112 aa.set(i, two); in testGetSet()
113 assertSame(two, aa.get(i)); in testGetSet()
127 aa.lazySet(i, two); in testGetLazySet()
128 assertSame(two, aa.get(i)); in testGetLazySet()
141 assertTrue(aa.compareAndSet(i, one, two)); in testCompareAndSet()
142 assertTrue(aa.compareAndSet(i, two, m4)); in testCompareAndSet()
160 while (!a.compareAndSet(0, two, three)) in testCompareAndSetInMultipleThreads()
165 assertTrue(a.compareAndSet(0, one, two)); in testCompareAndSetInMultipleThreads()
[all …]
DThreadLocalTest.java47 tl.set(two); in testRemove()
48 assertSame(tl.get(), two); in testRemove() local
59 itl.set(two); in testRemoveITL()
60 assertSame(itl.get(), two); in testRemoveITL() local
DTreeMapTest.java44 map.put(two, "B"); in map5()
171 assertTrue(s.contains(two)); in testKeySet()
279 (e.getKey().equals(two) && e.getValue().equals("B")) ||
298 (e.getKey().equals(two) && e.getValue().equals("B")) ||
342 assertTrue(empty.containsKey(two));
364 assertEquals(two, e1.getKey());
436 assertEquals(two, e1);
511 assertEquals(two, e.getKey());
545 map.remove(two);
632 NavigableMap sm = map.subMap(two, true, four, false);
[all …]
DConcurrentSkipListMapTest.java45 map.put(two, "B"); in map5()
172 assertTrue(s.contains(two)); in testKeySet()
296 (e.getKey().equals(two) && e.getValue().equals("B")) ||
315 (e.getKey().equals(two) && e.getValue().equals("B")) ||
359 assertTrue(empty.containsKey(two));
451 assertEquals(two, e1.getKey());
524 assertEquals(two, e.getKey());
555 assertEquals(two, e1);
630 assertEquals(two, e.getKey());
664 map.remove(two);
[all …]
DTreeSubMapTest.java43 map.put(two, "B"); in map5()
164 assertTrue(s.contains(two)); in testKeySet()
212 (e.getKey().equals(two) && e.getValue().equals("B")) ||
228 assertTrue(empty.containsKey(two));
250 assertEquals(two, e1.getKey());
325 assertEquals(two, e.getKey());
362 map.remove(two);
459 SortedMap sm = map.subMap(two, four);
460 assertEquals(two, sm.firstKey());
464 assertTrue(sm.containsKey(two));
[all …]
DTreeSetTest.java69 q.add(two); in set5()
391 assertEquals(two, e1); in testLower()
552 SortedSet sm = set.subSet(two, four); in testSubSetContents()
553 assertEquals(two, sm.first()); in testSubSetContents()
557 assertTrue(sm.contains(two)); in testSubSetContents()
564 assertEquals(two, k); in testSubSetContents()
571 assertFalse(set.contains(two)); in testSubSetContents()
583 SortedSet sm = set.subSet(two, three); in testSubSetContents2()
585 assertEquals(two, sm.first()); in testSubSetContents2()
586 assertEquals(two, sm.last()); in testSubSetContents2()
[all …]
DConcurrentSkipListSubMapTest.java44 map.put(two, "B"); in map5()
165 assertTrue(s.contains(two)); in testKeySet()
255 (e.getKey().equals(two) && e.getValue().equals("B")) ||
271 assertTrue(empty.containsKey(two));
363 assertEquals(two, e1.getKey());
438 assertEquals(two, e.getKey());
472 map.remove(two);
624 SortedMap sm = map.subMap(two, four);
625 assertEquals(two, sm.firstKey());
629 assertTrue(sm.containsKey(two));
[all …]
DConcurrentSkipListSetTest.java65 q.add(two); in set5()
387 assertEquals(two, e1); in testLower()
549 SortedSet sm = set.subSet(two, four); in testSubSetContents()
550 assertEquals(two, sm.first()); in testSubSetContents()
554 assertTrue(sm.contains(two)); in testSubSetContents()
561 assertEquals(two, k); in testSubSetContents()
568 assertFalse(set.contains(two)); in testSubSetContents()
580 SortedSet sm = set.subSet(two, three); in testSubSetContents2()
582 assertEquals(two, sm.first()); in testSubSetContents2()
583 assertEquals(two, sm.last()); in testSubSetContents2()
[all …]
DTreeSubSetTest.java64 q.add(two); in set5()
342 assertEquals(two, e1); in testLower()
503 SortedSet sm = set.subSet(two, four); in testSubSetContents()
504 assertEquals(two, sm.first()); in testSubSetContents()
508 assertTrue(sm.contains(two)); in testSubSetContents()
515 assertEquals(two, k); in testSubSetContents()
522 assertFalse(set.contains(two)); in testSubSetContents()
534 SortedSet sm = set.subSet(two, three); in testSubSetContents2()
536 assertEquals(two, sm.first()); in testSubSetContents2()
537 assertEquals(two, sm.last()); in testSubSetContents2()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DTimestampTest.java69 Timestamp two = new Timestamp(now, cpath); in testEqualsObject() local
72 assertTrue(one.equals(two)); in testEqualsObject()
73 assertTrue(two.equals(one)); in testEqualsObject()
108 Timestamp two = new Timestamp(now, cpath); in testHashCode() local
113 assertTrue(one.hashCode() == two.hashCode()); in testHashCode()
115 assertTrue(two.hashCode() != three.hashCode()); in testHashCode()
DCodeSignerTest.java85 CodeSigner two = new CodeSigner(cpath, ts); in testEqualsObject() local
92 assertTrue(one.equals(two)); in testEqualsObject()
93 assertTrue(two.equals(one)); in testEqualsObject()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DSerializationTestClass.java105 public int two; field in SerializationTestClass.TestFieldsTwoPublic
116 private int two; field in SerializationTestClass.TestFieldsTwoPrivate
125 protected int two; field in SerializationTestClass.TestFieldsTwoProtected
134 static int two; field in SerializationTestClass.TestFieldsTwoStatic
143 final int two = 0; field in SerializationTestClass.TestFieldsTwoFinal
152 volatile int two; field in SerializationTestClass.TestFieldsTwoVolatile
161 transient int two; field in SerializationTestClass.TestFieldsTwoTransient
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerTest.java33 BigInteger two = new BigInteger("2", 10); field in BigIntegerTest
46 BigInteger twoToTheSeventy = two.pow(70);
111 .setBit(16).subtract(two))); in test_Constructor$B()
125 .setBit(16).subtract(two))); in test_ConstructorI$B()
128 .setBit(16).subtract(two).negate())); in test_ConstructorI$B()
232 assertTrue("Smaller number returned >= 0", one.compareTo(two) < 0); in test_compareToLjava_math_BigInteger()
233 assertTrue("Larger number returned >= 0", two.compareTo(one) > 0); in test_compareToLjava_math_BigInteger()
236 two.negate().compareTo(one) < 0); in test_compareToLjava_math_BigInteger()
245 assertTrue("Incorrect intValue for 2", two.intValue() == 2); in test_intValue()
254 assertTrue("Incorrect longValue for 2", two.longValue() == 2); in test_longValue()
[all …]
/libcore/luni/src/test/java/libcore/java/util/function/
DBiConsumerTest.java27 BiConsumer<String, StringBuilder> two = (s, t) -> t.append("two").append(s); in testAndThen() local
30 one.andThen(two).accept("z", sb); in testAndThen()
34 two.andThen(one).accept("z", sb); in testAndThen()
DDoubleConsumerTest.java28 DoubleConsumer two = d -> sb.append("two:" + d); in testAndThen() local
30 one.andThen(two).accept(1.0d); in testAndThen()
DIntConsumerTest.java28 IntConsumer two = i -> sb.append("two:" + i); in testAndThen() local
30 one.andThen(two).accept(1); in testAndThen()
DLongConsumerTest.java28 LongConsumer two = l -> sb.append("two:" + l); in testAndThen() local
30 one.andThen(two).accept(1L); in testAndThen()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DConcurrentModTest.java37 Double two = new Double(2.0); in testGet() local
41 al.add(two); in testGet()
81 Double two = new Double(2.0); in testSet() local
85 al.add(two); in testSet()
98 sub.set(1, two); in testSet()
111 Double two = new Double(2.0); in testAdd() local
115 al.add(two); in testAdd()
128 sub.add(1, two); in testAdd()
141 Double two = new Double(2.0); in testRemove() local
145 al.add(two); in testRemove()
[all …]
/libcore/luni/src/test/java/libcore/java/math/
DBigIntegerTest.java216 BigInteger two = BigInteger.valueOf(2); // BigInteger.TWO added in OpenJDK 9 in test_gcd() local
218 try_gcd_variants(BigInteger.TEN, two, two); in test_gcd()
225 try_gcd_variants(large, two, two); in test_gcd()
/libcore/luni/src/test/java/libcore/xml/
DSimpleBuilderTest.java72 Element two = (Element) list.item(1); in testGoodFile1() local
79 getTextContent(two)); in testGoodFile1()
84 assertEquals("zwei", two.getAttribute("two")); in testGoodFile1()

123