Home
last modified time | relevance | path

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

12345

/libcore/jsr166-tests/src/test/java/jsr166/
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 …]
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 …]
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 …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DAtomicMarkableReferenceTest.java54 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testConstructor()
55 assertSame(one, ai.getReference()); in testConstructor()
67 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testGetSet()
68 assertSame(one, ai.getReference()); in testGetSet()
70 assertSame(one, ai.get(mark)); in testGetSet()
77 ai.set(one, true); in testGetSet()
78 assertSame(one, ai.getReference()); in testGetSet()
80 assertSame(one, ai.get(mark)); in testGetSet()
89 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testAttemptMark()
91 assertTrue(ai.attemptMark(one, true)); in testAttemptMark()
[all …]
DAtomicStampedReferenceTest.java54 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testConstructor()
55 assertSame(one, ai.getReference()); in testConstructor()
67 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testGetSet()
68 assertSame(one, ai.getReference()); in testGetSet()
70 assertSame(one, ai.get(mark)); in testGetSet()
77 ai.set(one, 1); in testGetSet()
78 assertSame(one, ai.getReference()); in testGetSet()
80 assertSame(one, ai.get(mark)); in testGetSet()
89 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testAttemptStamp()
91 assertTrue(ai.attemptStamp(one, 1)); in testAttemptStamp()
[all …]
DAtomicReferenceTest.java54 AtomicReference ai = new AtomicReference(one); in testConstructor()
55 assertSame(one, ai.get()); in testConstructor()
70 AtomicReference ai = new AtomicReference(one); in testGetSet()
71 assertSame(one, ai.get()); in testGetSet()
82 AtomicReference ai = new AtomicReference(one); in testGetLazySet()
83 assertSame(one, ai.get()); in testGetLazySet()
94 AtomicReference ai = new AtomicReference(one); in testCompareAndSet()
95 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSet()
109 final AtomicReference ai = new AtomicReference(one); in testCompareAndSetInMultipleThreads()
117 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSetInMultipleThreads()
[all …]
DAtomicReferenceFieldUpdaterTest.java74 this.protectedField = one; in checkCompareAndSetProtectedSub()
75 assertTrue(a.compareAndSet(this, one, two)); in checkCompareAndSetProtectedSub()
87 obj.x = one; in checkPackageAccess()
91 assertSame(one, a.get(obj)); in checkPackageAccess()
92 assertTrue(a.compareAndSet(obj, one, two)); in checkPackageAccess()
179 x = one; in testGetSet()
180 assertSame(one, a.get(this)); in testGetSet()
193 x = one; in testGetLazySet()
194 assertSame(one, a.get(this)); in testGetLazySet()
207 x = one; in testCompareAndSet()
[all …]
DExchangerTest.java62 assertSame(one, e.exchange(two)); in testExchange()
63 assertSame(two, e.exchange(one)); in testExchange()
67 assertSame(two, e.exchange(one)); in testExchange()
68 assertSame(one, e.exchange(two)); in testExchange()
82 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
83 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
87 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
88 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
104 e.exchange(one); in testExchange_InterruptedException()
156 assertSame(two, e.exchange(one)); in testReplacementAfterExchange()
[all …]
DAtomicReferenceArrayTest.java76 Integer[] a = { two, one, three, four, seven }; in testConstructor2()
87 Integer[] a = { two, one, three, four, seven }; in testConstructorSubClassArray()
133 aa.set(i, one); in testGetSet()
134 assertSame(one, aa.get(i)); in testGetSet()
148 aa.lazySet(i, one); in testGetLazySet()
149 assertSame(one, aa.get(i)); in testGetLazySet()
163 aa.set(i, one); in testCompareAndSet()
164 assertTrue(aa.compareAndSet(i, one, two)); in testCompareAndSet()
180 a.set(0, one); in testCompareAndSetInMultipleThreads()
188 assertTrue(a.compareAndSet(0, one, two)); in testCompareAndSetInMultipleThreads()
[all …]
DConcurrentSkipListMapTest.java65 map.put(one, "A"); in map5()
111 assertTrue(map.containsKey(one)); in testContainsKey()
130 assertEquals("A", (String)map.get(one)); in testGet()
132 assertNull(empty.get(one)); in testGet()
150 assertEquals(one, map.firstKey()); in testFirstKey()
194 assertTrue(s.contains(one)); in testKeySet()
209 assertEquals(last, one); in testKeySetOrder()
266 assertEquals(last, one); in testDescendingKeySetDescendingIteratorOrder()
318 (e.getKey().equals(one) && e.getValue().equals("A")) ||
337 (e.getKey().equals(one) && e.getValue().equals("A")) ||
[all …]
DAtomic8Test.java181 AtomicReference<Integer> a = new AtomicReference<>(one); in testReferenceGetAndUpdate()
192 AtomicReference<Integer> a = new AtomicReference<>(one); in testReferenceUpdateAndGet()
203 AtomicReference<Integer> a = new AtomicReference<>(one); in testReferenceGetAndAccumulate()
214 AtomicReference<Integer> a = new AtomicReference<>(one); in testReferenceAccumulateAndGet()
321 a.set(0, one); in testReferenceArrayGetAndUpdate()
333 a.set(0, one); in testReferenceArrayUpdateAndGet()
344 a.set(0, one); in testReferenceArrayGetAndAccumulate()
356 a.set(0, one); in testReferenceArrayAccumulateAndGet()
471 a.set(this, one); in testReferenceFieldUpdaterGetAndUpdate()
484 a.set(this, one); in testReferenceFieldUpdaterUpdateAndGet()
[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()
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()
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()
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()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerTest.java31 BigInteger one = new BigInteger("1", 10); field in BigIntegerTest
215 assertTrue("0=1", !zero.equals(one)); in test_equalsLjava_lang_Object()
217 assertTrue("1=-1", !one.equals(minusOne)); in test_equalsLjava_lang_Object()
227 assertTrue("Smaller number returned >= 0", one.compareTo(two) < 0); in test_compareToLjava_math_BigInteger()
228 assertTrue("Larger number returned >= 0", two.compareTo(one) > 0); in test_compareToLjava_math_BigInteger()
229 assertTrue("Equal numbers did not return 0", one.compareTo(one) == 0); in test_compareToLjava_math_BigInteger()
231 two.negate().compareTo(one) < 0); in test_compareToLjava_math_BigInteger()
269 assertTrue("0+1", zero.add(one).equals(one)); in test_addLjava_math_BigInteger()
270 assertTrue("1+0", one.add(zero).equals(one)); in test_addLjava_math_BigInteger()
271 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()

12345