Home
last modified time | relevance | path

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

123

/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicStampedReferenceTest.java31 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testConstructor()
32 assertSame(one, ai.getReference()); in testConstructor()
44 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testGetSet()
45 assertSame(one, ai.getReference()); in testGetSet()
47 assertSame(one, ai.get(mark)); in testGetSet()
54 ai.set(one, 1); in testGetSet()
55 assertSame(one, ai.getReference()); in testGetSet()
57 assertSame(one, ai.get(mark)); in testGetSet()
66 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testAttemptStamp()
68 assertTrue(ai.attemptStamp(one, 1)); in testAttemptStamp()
[all …]
DAtomicMarkableReferenceTest.java31 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testConstructor()
32 assertSame(one, ai.getReference()); in testConstructor()
44 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testGetSet()
45 assertSame(one, ai.getReference()); in testGetSet()
47 assertSame(one, ai.get(mark)); in testGetSet()
54 ai.set(one, true); in testGetSet()
55 assertSame(one, ai.getReference()); in testGetSet()
57 assertSame(one, ai.get(mark)); in testGetSet()
66 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testAttemptMark()
68 assertTrue(ai.attemptMark(one, true)); in testAttemptMark()
[all …]
DAtomicReferenceTest.java31 AtomicReference ai = new AtomicReference(one); in testConstructor()
32 assertSame(one, ai.get()); in testConstructor()
47 AtomicReference ai = new AtomicReference(one); in testGetSet()
48 assertSame(one, ai.get()); in testGetSet()
59 AtomicReference ai = new AtomicReference(one); in testGetLazySet()
60 assertSame(one, ai.get()); in testGetLazySet()
71 AtomicReference ai = new AtomicReference(one); in testCompareAndSet()
72 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSet()
86 final AtomicReference ai = new AtomicReference(one); in testCompareAndSetInMultipleThreads()
94 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSetInMultipleThreads()
[all …]
DAtomicReferenceFieldUpdaterTest.java51 this.protectedField = one; in checkCompareAndSetProtectedSub()
52 assertTrue(a.compareAndSet(this, one, two)); in checkCompareAndSetProtectedSub()
64 obj.x = one; in checkPackageAccess()
68 assertSame(one, a.get(obj)); in checkPackageAccess()
69 assertTrue(a.compareAndSet(obj, one, two)); in checkPackageAccess()
156 x = one; in testGetSet()
157 assertSame(one, a.get(this)); in testGetSet()
170 x = one; in testGetLazySet()
171 assertSame(one, a.get(this)); in testGetLazySet()
184 x = one; 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()
81 e.exchange(one); in testExchange_InterruptedException()
133 assertSame(two, e.exchange(one)); in testReplacementAfterExchange()
[all …]
DAtomicReferenceArrayTest.java53 Integer[] a = { two, one, three, four, seven }; in testConstructor2()
64 Integer[] a = { two, one, three, four, seven }; in testConstructorSubClassArray()
110 aa.set(i, one); in testGetSet()
111 assertSame(one, aa.get(i)); in testGetSet()
125 aa.lazySet(i, one); in testGetLazySet()
126 assertSame(one, aa.get(i)); in testGetLazySet()
140 aa.set(i, one); in testCompareAndSet()
141 assertTrue(aa.compareAndSet(i, one, two)); in testCompareAndSet()
157 a.set(0, one); in testCompareAndSetInMultipleThreads()
165 assertTrue(a.compareAndSet(0, one, two)); in testCompareAndSetInMultipleThreads()
[all …]
DAtomic8Test.java160 AtomicReference<Integer> a = new AtomicReference<Integer>(one); in testReferenceGetAndUpdate()
171 AtomicReference<Integer> a = new AtomicReference<Integer>(one); in testReferenceUpdateAndGet()
182 AtomicReference<Integer> a = new AtomicReference<Integer>(one); in testReferenceGetAndAccumulate()
193 AtomicReference<Integer> a = new AtomicReference<Integer>(one); in testReferenceAccumulateAndGet()
300 a.set(0, one); in testReferenceArrayGetAndUpdate()
312 a.set(0, one); in testReferenceArrayUpdateAndGet()
323 a.set(0, one); in testReferenceArrayGetAndAccumulate()
335 a.set(0, one); in testReferenceArrayAccumulateAndGet()
450 a.set(this, one); in testReferenceFieldUpdaterGetAndUpdate()
463 a.set(this, one); in testReferenceFieldUpdaterUpdateAndGet()
[all …]
DConcurrentSkipListMapTest.java42 map.put(one, "A"); in map5()
88 assertTrue(map.containsKey(one)); in testContainsKey()
107 assertEquals("A", (String)map.get(one)); in testGet()
109 assertNull(empty.get(one)); in testGet()
127 assertEquals(one, map.firstKey()); in testFirstKey()
171 assertTrue(s.contains(one)); in testKeySet()
186 assertEquals(last, one); in testKeySetOrder()
243 assertEquals(last, one); in testDescendingKeySetDescendingIteratorOrder()
295 (e.getKey().equals(one) && e.getValue().equals("A")) ||
314 (e.getKey().equals(one) && e.getValue().equals("A")) ||
[all …]
DConcurrentHashMapTest.java42 map.put(one, "A"); in map5()
260 assertTrue(map.containsKey(one)); in testContainsKey()
294 assertEquals("A", (String)map.get(one)); in testGet()
331 assertTrue(s.contains(one)); in testKeySet()
406 (e.getKey().equals(one) && e.getValue().equals("A")) || in testEntrySet()
422 assertTrue(empty.containsKey(one)); in testPutAll()
443 assertEquals("A", map.putIfAbsent(one, "Z")); in testPutIfAbsent2()
460 assertNotNull(map.replace(one, "Z")); in testReplace2()
461 assertEquals("Z", map.get(one)); in testReplace2()
469 assertEquals("A", map.get(one)); in testReplaceValue()
[all …]
DConcurrentSkipListSubMapTest.java41 map.put(one, "A"); in map5()
49 return map.subMap(one, true, seven, false); in map5()
71 return map.tailMap(one, true); in map0()
107 assertTrue(map.containsKey(one)); in testContainsKey()
126 assertEquals("A", (String)map.get(one)); in testGet()
128 assertNull(empty.get(one)); in testGet()
146 assertEquals(one, map.firstKey()); in testFirstKey()
164 assertTrue(s.contains(one)); in testKeySet()
179 assertEquals(last, one); in testKeySetOrder()
254 (e.getKey().equals(one) && e.getValue().equals("A")) ||
[all …]
DTreeMapTest.java41 map.put(one, "A"); in map5()
87 assertTrue(map.containsKey(one)); in testContainsKey()
106 assertEquals("A", (String)map.get(one)); in testGet()
108 assertNull(empty.get(one)); in testGet()
126 assertEquals(one, map.firstKey()); in testFirstKey()
170 assertTrue(s.contains(one)); in testKeySet()
185 assertEquals(last, one); in testKeySetOrder()
242 assertEquals(last, one); in testDescendingKeySetDescendingIteratorOrder()
278 (e.getKey().equals(one) && e.getValue().equals("A")) ||
297 (e.getKey().equals(one) && e.getValue().equals("A")) ||
[all …]
DCopyOnWriteArraySetTest.java91 assertTrue(full.addAll(Arrays.asList(three, four, one))); in testAddAll2()
93 assertFalse(full.addAll(Arrays.asList(three, four, one))); in testAddAll2()
102 full.add(one); in testAdd2()
130 assertTrue(full.contains(one)); in testContains()
191 assertTrue(full.containsAll(Arrays.asList(one))); in testContainsAll()
192 assertTrue(full.containsAll(Arrays.asList(one, two))); in testContainsAll()
193 assertFalse(full.containsAll(Arrays.asList(one, two, six))); in testContainsAll()
281 assertTrue(full.removeAll(Arrays.asList(one, two))); in testRemoveAll()
283 assertFalse(full.removeAll(Arrays.asList(one, two))); in testRemoveAll()
292 full.remove(one); in testRemove()
[all …]
DConcurrentHashMap8Test.java46 map.put(one, "A"); in map5()
61 assertEquals(map.getOrDefault(one, "Z"), "A"); in testGetOrDefault()
79 assertEquals("A", map.computeIfAbsent(one, (x) -> "Z")); in testComputeIfAbsent2()
105 assertEquals("Z", map.computeIfPresent(one, (x, y) -> "Z")); in testComputeIfPresent2()
130 assertEquals("Z", map.compute(one, (x, y) -> "Z")); in testCompute3()
138 map.compute(one, (x, y) -> null); in testCompute4()
139 assertFalse(map.containsKey(one)); in testCompute4()
155 assertEquals("Z", map.merge(one, "Y", (x, y) -> "Z")); in testMerge2()
163 map.merge(one, "Y", (x, y) -> null); in testMerge3()
164 assertFalse(map.containsKey(one)); in testMerge3()
[all …]
DSynchronousQueueTest.java75 assertFalse(q.offer(one)); in testOffer()
87 q.add(one); in testAdd()
166 q.put(one); in testPutWithTake()
178 try { assertSame(one, q.take()); } in testPutWithTake()
486 assertFalse(q.offer(one));
488 assertTrue(q.offer(one, LONG_DELAY_MS, MILLISECONDS));
495 assertSame(one, q.take());
514 assertSame(one, q.poll(LONG_DELAY_MS, MILLISECONDS));
521 q.put(one);
569 q.put(one);
[all …]
DThreadLocalTest.java27 return one;
46 assertSame(tl.get(), one); in testRemove() local
50 assertSame(tl.get(), one); in testRemove() local
DCopyOnWriteArrayListTest.java107 assertEquals(2, full.addAllAbsent(Arrays.asList(three, four, one))); in testAddAllAbsent()
109 assertEquals(0, full.addAllAbsent(Arrays.asList(three, four, one))); in testAddAllAbsent()
118 full.addIfAbsent(one); in testAddIfAbsent()
156 assertTrue(full.contains(one)); in testContains()
208 assertTrue(full.containsAll(Arrays.asList(one))); in testContainsAll()
209 assertTrue(full.containsAll(Arrays.asList(one, two))); in testContainsAll()
210 assertFalse(full.containsAll(Arrays.asList(one, two, six))); in testContainsAll()
232 assertEquals(1, full.indexOf(one)); in testIndexOf()
242 assertEquals(1, full.indexOf(one, 0)); in testIndexOf2()
243 assertEquals(-1, full.indexOf(one, 2)); in testIndexOf2()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DTimestampTest.java68 Timestamp one = new Timestamp(now, cpath); in testEqualsObject() local
71 assertTrue(one.equals(one)); in testEqualsObject()
72 assertTrue(one.equals(two)); in testEqualsObject()
73 assertTrue(two.equals(one)); in testEqualsObject()
74 assertFalse(one.equals(null)); in testEqualsObject()
75 assertFalse(one.equals(new Object())); in testEqualsObject()
78 assertFalse(one.equals(two1)); in testEqualsObject()
107 Timestamp one = new Timestamp(now, cpath); in testHashCode() local
113 assertTrue(one.hashCode() == two.hashCode()); in testHashCode()
114 assertTrue(one.hashCode() != three.hashCode()); in testHashCode()
DCodeSignerTest.java84 CodeSigner one = new CodeSigner(cpath, ts); in testEqualsObject() local
91 assertTrue(one.equals(one)); in testEqualsObject()
92 assertTrue(one.equals(two)); in testEqualsObject()
93 assertTrue(two.equals(one)); in testEqualsObject()
94 assertFalse(one.equals(three)); in testEqualsObject()
95 assertFalse(three.equals(one)); in testEqualsObject()
100 assertFalse( one.equals(null) ); in testEqualsObject()
101 assertFalse( one.equals(new Object()) ); in testEqualsObject()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DSerializationTestClass.java100 public int one; field in SerializationTestClass.TestFieldsOnePublic
104 public int one; field in SerializationTestClass.TestFieldsTwoPublic
110 private int one; field in SerializationTestClass.TestFieldsOnePrivate
115 private int one; field in SerializationTestClass.TestFieldsTwoPrivate
120 protected int one; field in SerializationTestClass.TestFieldsOneProtected
124 protected int one; field in SerializationTestClass.TestFieldsTwoProtected
129 static int one; field in SerializationTestClass.TestFieldsOneStatic
133 static int one; field in SerializationTestClass.TestFieldsTwoStatic
138 final int one = 0; field in SerializationTestClass.TestFieldsOneFinal
142 final int one = 0; field in SerializationTestClass.TestFieldsTwoFinal
[all …]
/libcore/luni/src/test/java/libcore/java/util/function/
DBiConsumerTest.java26 BiConsumer<String, StringBuilder> one = (s, t) -> t.append("one").append(s); in testAndThen() local
30 one.andThen(two).accept("z", sb); in testAndThen()
34 two.andThen(one).accept("z", sb); in testAndThen()
39 BiConsumer<String, StringBuilder> one = (s, t) -> t.append("one").append(s); in testAndThen_null() local
41 one.andThen(null); in testAndThen_null()
DDoubleConsumerTest.java27 DoubleConsumer one = d -> sb.append("one:" + d + ","); in testAndThen() local
30 one.andThen(two).accept(1.0d); in testAndThen()
35 DoubleConsumer one = s -> {}; in testAndThen_null() local
37 one.andThen(null); in testAndThen_null()
DIntConsumerTest.java27 IntConsumer one = i -> sb.append("one:" + i + ","); in testAndThen() local
30 one.andThen(two).accept(1); in testAndThen()
35 IntConsumer one = s -> {}; in testAndThen_null() local
37 one.andThen(null); in testAndThen_null()
DLongConsumerTest.java27 LongConsumer one = l -> sb.append("one:" + l + ","); in testAndThen() local
30 one.andThen(two).accept(1L); in testAndThen()
35 LongConsumer one = s -> {}; in testAndThen_null() local
37 one.andThen(null); in testAndThen_null()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerTest.java31 BigInteger one = new BigInteger("1", 10); field in BigIntegerTest
220 assertTrue("0=1", !zero.equals(one)); in test_equalsLjava_lang_Object()
222 assertTrue("1=-1", !one.equals(minusOne)); in test_equalsLjava_lang_Object()
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()
234 assertTrue("Equal numbers did not return 0", one.compareTo(one) == 0); in test_compareToLjava_math_BigInteger()
236 two.negate().compareTo(one) < 0); in test_compareToLjava_math_BigInteger()
274 assertTrue("0+1", zero.add(one).equals(one)); in test_addLjava_math_BigInteger()
275 assertTrue("1+0", one.add(zero).equals(one)); in test_addLjava_math_BigInteger()
276 assertTrue("1+1", one.add(one).equals(two)); in test_addLjava_math_BigInteger()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidInstanceofTest.java51 InterfaceOne one = mOne; in testDerivedOne() local
53 assertFalse("m_one should not be a ChildOfAFive", one instanceof ChildOfAFive); in testDerivedOne()
93 InterfaceOne one = mFive; in testFailInterface() local
95 assertFalse("m_five does not implement InterfaceFive", one instanceof InterfaceFive); in testFailInterface()

123