Home
last modified time | relevance | path

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

123

/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicMarkableReferenceTest.java20 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testConstructor()
21 assertSame(one, ai.getReference()); in testConstructor()
33 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testGetSet()
34 assertSame(one, ai.getReference()); in testGetSet()
36 assertSame(one, ai.get(mark)); in testGetSet()
43 ai.set(one, true); in testGetSet()
44 assertSame(one, ai.getReference()); in testGetSet()
46 assertSame(one, ai.get(mark)); in testGetSet()
55 AtomicMarkableReference ai = new AtomicMarkableReference(one, false); in testAttemptMark()
57 assertTrue(ai.attemptMark(one, true)); in testAttemptMark()
[all …]
DAtomicStampedReferenceTest.java20 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testConstructor()
21 assertSame(one, ai.getReference()); in testConstructor()
33 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testGetSet()
34 assertSame(one, ai.getReference()); in testGetSet()
36 assertSame(one, ai.get(mark)); in testGetSet()
43 ai.set(one, 1); in testGetSet()
44 assertSame(one, ai.getReference()); in testGetSet()
46 assertSame(one, ai.get(mark)); in testGetSet()
55 AtomicStampedReference ai = new AtomicStampedReference(one, 0); in testAttemptStamp()
57 assertTrue(ai.attemptStamp(one, 1)); in testAttemptStamp()
[all …]
DAtomicReferenceTest.java20 AtomicReference ai = new AtomicReference(one); in testConstructor()
21 assertSame(one, ai.get()); in testConstructor()
36 AtomicReference ai = new AtomicReference(one); in testGetSet()
37 assertSame(one, ai.get()); in testGetSet()
48 AtomicReference ai = new AtomicReference(one); in testGetLazySet()
49 assertSame(one, ai.get()); in testGetLazySet()
60 AtomicReference ai = new AtomicReference(one); in testCompareAndSet()
61 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSet()
75 final AtomicReference ai = new AtomicReference(one); in testCompareAndSetInMultipleThreads()
83 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSetInMultipleThreads()
[all …]
DExchangerTest.java27 assertSame(one, e.exchange(two)); in testExchange()
28 assertSame(two, e.exchange(one)); in testExchange()
32 assertSame(two, e.exchange(one)); in testExchange()
33 assertSame(one, e.exchange(two)); in testExchange()
47 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
48 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
52 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
53 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
69 e.exchange(one); in testExchange_InterruptedException()
121 assertSame(two, e.exchange(one)); in testReplacementAfterExchange()
[all …]
DAtomicReferenceFieldUpdaterTest.java73 x = one; in testGetSet()
74 assertSame(one, a.get(this)); in testGetSet()
87 x = one; in testGetLazySet()
88 assertSame(one, a.get(this)); in testGetLazySet()
101 x = one; in testCompareAndSet()
102 assertTrue(a.compareAndSet(this, one, two)); in testCompareAndSet()
116 x = one; in testCompareAndSetInMultipleThreads()
127 assertTrue(a.compareAndSet(this, one, two)); in testCompareAndSetInMultipleThreads()
140 x = one; in testWeakCompareAndSet()
141 while (!a.weakCompareAndSet(this, one, two)); in testWeakCompareAndSet()
[all …]
DAtomicReferenceArrayTest.java42 Integer[] a = { two, one, three, four, seven }; in testConstructor2()
53 Integer[] a = { two, one, three, four, seven }; in testConstructorSubClassArray()
99 aa.set(i, one); in testGetSet()
100 assertSame(one, aa.get(i)); in testGetSet()
114 aa.lazySet(i, one); in testGetLazySet()
115 assertSame(one, aa.get(i)); in testGetLazySet()
129 aa.set(i, one); in testCompareAndSet()
130 assertTrue(aa.compareAndSet(i, one, two)); in testCompareAndSet()
146 a.set(0, one); in testCompareAndSetInMultipleThreads()
154 assertTrue(a.compareAndSet(0, one, two)); in testCompareAndSetInMultipleThreads()
[all …]
DConcurrentSkipListMapTest.java21 map.put(one, "A"); in map5()
67 assertTrue(map.containsKey(one)); in testContainsKey()
86 assertEquals("A", (String)map.get(one)); in testGet()
88 assertNull(empty.get(one)); in testGet()
106 assertEquals(one, map.firstKey()); in testFirstKey()
150 assertTrue(s.contains(one)); in testKeySet()
165 assertEquals(last, one); in testKeySetOrder()
222 assertEquals(last, one); in testDescendingKeySetDescendingIteratorOrder()
274 (e.getKey().equals(one) && e.getValue().equals("A")) ||
293 (e.getKey().equals(one) && e.getValue().equals("A")) ||
[all …]
DConcurrentHashMapTest.java23 map.put(one, "A"); in map5()
176 assertTrue(map.containsKey(one)); in testContainsKey()
210 assertEquals("A", (String)map.get(one)); in testGet()
246 assertTrue(s.contains(one)); in testKeySet()
321 (e.getKey().equals(one) && e.getValue().equals("A")) || in testEntrySet()
337 assertTrue(empty.containsKey(one)); in testPutAll()
358 assertEquals("A", map.putIfAbsent(one, "Z")); in testPutIfAbsent2()
375 assertNotNull(map.replace(one, "Z")); in testReplace2()
376 assertEquals("Z", map.get(one)); in testReplace2()
384 assertEquals("A", map.get(one)); in testReplaceValue()
[all …]
DTreeMapTest.java20 map.put(one, "A"); in map5()
66 assertTrue(map.containsKey(one)); in testContainsKey()
85 assertEquals("A", (String)map.get(one)); in testGet()
87 assertNull(empty.get(one)); in testGet()
105 assertEquals(one, map.firstKey()); in testFirstKey()
149 assertTrue(s.contains(one)); in testKeySet()
164 assertEquals(last, one); in testKeySetOrder()
221 assertEquals(last, one); in testDescendingKeySetDescendingIteratorOrder()
257 (e.getKey().equals(one) && e.getValue().equals("A")) ||
276 (e.getKey().equals(one) && e.getValue().equals("A")) ||
[all …]
DThreadLocalTest.java18 return one;
37 assertSame(tl.get(), one); in testRemove() local
41 assertSame(tl.get(), one); in testRemove() local
DConcurrentSkipListSubMapTest.java23 map.put(one, "A"); in map5()
31 return map.subMap(one, true, seven, false); in map5()
53 return map.tailMap(one, true); in map0()
89 assertTrue(map.containsKey(one)); in testContainsKey()
108 assertEquals("A", (String)map.get(one)); in testGet()
110 assertNull(empty.get(one)); in testGet()
128 assertEquals(one, map.firstKey()); in testFirstKey()
146 assertTrue(s.contains(one)); in testKeySet()
161 assertEquals(last, one); in testKeySetOrder()
236 (e.getKey().equals(one) && e.getValue().equals("A")) ||
[all …]
DSynchronousQueueTest.java47 assertFalse(q.offer(one)); in testOffer()
59 q.add(one); in testAdd()
138 q.put(one); in testPutWithTake()
150 try { assertSame(one, q.take()); } in testPutWithTake()
462 assertFalse(q.offer(one));
464 assertTrue(q.offer(one, LONG_DELAY_MS, MILLISECONDS));
471 assertSame(one, q.take());
490 assertSame(one, q.poll(LONG_DELAY_MS, MILLISECONDS));
497 q.put(one);
546 q.put(one);
[all …]
DAbstractQueueTest.java24 public Integer peek() { return one; } in peek()
25 public Integer poll() { return one; } in poll()
55 q.add(one); in testAddF()
DCopyOnWriteArrayListTest.java100 v.add(one); // will not add this element in testAddAllAbsent()
110 full.addIfAbsent(one); in testAddIfAbsent()
148 assertTrue(full.contains(one)); in testContains()
192 v.add(one); in testContainsAll()
212 assertEquals(1, full.indexOf(one)); in testIndexOf()
222 assertEquals(1, full.indexOf(one, 0)); in testIndexOf2()
223 assertEquals(-1, full.indexOf(one, 2)); in testIndexOf2()
297 full.add(one); in testLastIndexOf1()
299 assertEquals(3, full.lastIndexOf(one)); in testLastIndexOf1()
308 full.add(one); in testLastIndexOf2()
[all …]
DConcurrentLinkedDequeTest.java96 q.add(one); in testEmpty()
193 assertTrue(q.offer(one)); in testOffer()
195 assertSame(one, q.peekLast()); in testOffer()
204 assertTrue(q.offerFirst(one)); in testOfferFirst()
205 assertSame(one, q.peekFirst()); in testOfferFirst()
215 assertTrue(q.offerLast(one)); in testOfferLast()
217 assertSame(one, q.peekLast()); in testOfferLast()
259 assertTrue(q.add(one)); in testAdd()
261 assertSame(one, q.peekLast()); in testAdd()
270 q.addFirst(one); in testAddFirst()
[all …]
DTreeSubMapTest.java21 map.put(one, "A"); in map5()
29 return map.subMap(one, true, seven, false); in map5()
35 return map.tailMap(one, true); in map0()
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()
144 assertTrue(s.contains(one)); in testKeySet()
159 assertEquals(last, one); in testKeySetOrder()
192 (e.getKey().equals(one) && e.getValue().equals("A")) ||
[all …]
DCopyOnWriteArraySetTest.java86 v.add(one); // will not add this element in testAddAll2()
96 full.add(one); in testAdd2()
123 assertTrue(full.contains(one)); in testContains()
151 v.add(one); in testContainsAll()
230 v.add(one); in testRemoveAll()
241 full.remove(one); in testRemove()
242 assertFalse(full.contains(one)); in testRemove()
/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/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()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DConcurrentModTest.java36 Double one = new Double(1.0); in testGet() local
40 al.add(one); in testGet()
80 Double one = new Double(1.0); in testSet() local
84 al.add(one); in testSet()
110 Double one = new Double(1.0); in testAdd() local
114 al.add(one); in testAdd()
140 Double one = new Double(1.0); in testRemove() local
144 al.add(one); in testRemove()
206 Double one = new Double(1.0); in testAddAll() local
210 al.add(one); in testAddAll()
/libcore/luni/src/test/java/libcore/xml/
DSimpleBuilderTest.java71 Element one = (Element) list.item(0); in testGoodFile1() local
77 getTextContent(one)); in testGoodFile1()
83 assertEquals("eins", one.getAttribute("one")); in testGoodFile1()
/libcore/benchmarks/src/benchmarks/regression/
DReflectionBenchmark.java123 Integer one = Integer.valueOf(1); in timeMethod_invokePreBoxedI() local
125 m.invoke(instance, one); in timeMethod_invokePreBoxedI()
140 Integer one = Integer.valueOf(1); in timeMethod_invokeStaticPreBoxedI() local
142 m.invoke(null, one); in timeMethod_invokeStaticPreBoxedI()

123