Home
last modified time | relevance | path

Searched refs:zero (Results 1 – 25 of 34) sorted by relevance

12

/libcore/luni/src/test/java/libcore/java/lang/
DShortTest.java22 final short zero = 0; in test_compare() local
26 assertTrue(Short.compare(zero, zero) == 0); in test_compare()
27 assertTrue(Short.compare(max, zero) > 0); in test_compare()
29 assertTrue(Short.compare(zero, max) < 0); in test_compare()
30 assertTrue(Short.compare(zero, min) > 0); in test_compare()
31 assertTrue(Short.compare(min, zero) < 0); in test_compare()
DByteTest.java22 final byte zero = (byte) 0; in test_compare()
26 assertTrue(Byte.compare(zero, zero) == 0); in test_compare()
27 assertTrue(Byte.compare(max, zero) > 0); in test_compare()
29 assertTrue(Byte.compare(zero, max) < 0); in test_compare()
30 assertTrue(Byte.compare(zero, min) > 0); in test_compare()
31 assertTrue(Byte.compare(min, zero) < 0); in test_compare()
DIntegerTest.java41 final int zero = 0; in testCompare() local
45 assertTrue(Integer.compare(zero, zero) == 0); in testCompare()
46 assertTrue(Integer.compare(max, zero) > 0); in testCompare()
48 assertTrue(Integer.compare(zero, max) < 0); in testCompare()
49 assertTrue(Integer.compare(zero, min) > 0); in testCompare()
50 assertTrue(Integer.compare(min, zero) < 0); in testCompare()
DLongTest.java39 final long zero = 0L; in testCompare() local
43 assertTrue(Long.compare(zero, zero) == 0); in testCompare()
44 assertTrue(Long.compare(max, zero) > 0); in testCompare()
46 assertTrue(Long.compare(zero, max) < 0); in testCompare()
47 assertTrue(Long.compare(zero, min) > 0); in testCompare()
48 assertTrue(Long.compare(min, zero) < 0); in testCompare()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerTest.java29 BigInteger zero = new BigInteger("0", 10); field in BigIntegerTest
94 assertTrue("Random number is negative", bi.compareTo(zero) >= 0); in test_ConstructorILjava_util_Random()
131 assertTrue("Incorrect value for zero", bi.equals(zero)); in test_ConstructorI$B()
217 assertTrue("0=0", zero.equals(BigInteger.valueOf(0))); in test_equalsLjava_lang_Object()
220 assertTrue("0=1", !zero.equals(one)); in test_equalsLjava_lang_Object()
221 assertTrue("0=-1", !zero.equals(minusOne)); in test_equalsLjava_lang_Object()
273 assertTrue("0+0", zero.add(zero).equals(zero)); in test_addLjava_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()
277 assertTrue("0+(-1)", zero.add(minusOne).equals(minusOne)); in test_addLjava_math_BigInteger()
[all …]
DBigDecimalConvertTest.java90 long zero = 0; in testDoubleValuePlusZero() local
92 assertTrue("incorrect value", Double.doubleToLongBits(result) == zero); in testDoubleValuePlusZero()
152 int zero = 0; in testFloatValuePlusZero() local
154 assertTrue("incorrect value", Float.floatToIntBits(result) == zero); in testFloatValuePlusZero()
/libcore/jsr166-tests/src/test/java/jsr166/
DThreadLocalTest.java25 return zero;
49 assertSame(itl.get(), zero); in testRemoveITL() local
53 assertSame(itl.get(), zero); in testRemoveITL() local
DConcurrentLinkedDequeTest.java192 assertTrue(q.offer(zero)); in testOffer()
194 assertSame(zero, q.peekFirst()); in testOffer()
203 assertTrue(q.offerFirst(zero)); in testOfferFirst()
206 assertSame(zero, q.peekLast()); in testOfferFirst()
214 assertTrue(q.offerLast(zero)); in testOfferLast()
216 assertSame(zero, q.peekFirst()); in testOfferLast()
258 assertTrue(q.add(zero)); in testAdd()
260 assertSame(zero, q.peekFirst()); in testAdd()
269 q.addFirst(zero); in testAddFirst()
272 assertSame(zero, q.peekLast()); in testAddFirst()
[all …]
DSynchronousQueueTest.java37 assertFalse(q.offer(zero)); in testEmptyFull()
238 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
258 try { assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); } in testTimedPollWithOffer()
311 assertFalse(q.contains(zero));
334 Integer[] ints = new Integer[1]; ints[0] = zero;
347 Integer[] ints = new Integer[1]; ints[0] = zero;
360 Integer[] ints = new Integer[1]; ints[0] = zero;
520 assertFalse(clone.offer(zero));
DArrayDequeTest.java190 assertTrue(q.offer(zero)); in testOffer()
192 assertSame(zero, q.peekFirst()); in testOffer()
201 assertTrue(q.offerFirst(zero)); in testOfferFirst()
204 assertSame(zero, q.peekLast()); in testOfferFirst()
212 assertTrue(q.offerLast(zero)); in testOfferLast()
214 assertSame(zero, q.peekFirst()); in testOfferLast()
256 assertTrue(q.add(zero)); in testAdd()
258 assertSame(zero, q.peekFirst()); in testAdd()
267 q.addFirst(zero); in testAddFirst()
270 assertSame(zero, q.peekLast()); in testAddFirst()
[all …]
DAtomicReferenceTest.java107 assertSame(one, ai.getAndSet(zero)); in testGetAndSet()
108 assertSame(zero, ai.getAndSet(m10)); in testGetAndSet()
DAtomicReferenceFieldUpdaterTest.java155 assertSame(one, a.getAndSet(this, zero)); in testGetAndSet()
156 assertSame(zero, a.getAndSet(this, m10)); in testGetAndSet()
DBlockingQueueTest.java206 final Object zero = makeElement(0); in testTimedPollWithOffer() local
215 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
234 assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
DTreeSubMapTest.java20 map.put(zero, "Z"); in map5()
88 assertFalse(map.containsKey(zero)); in testContainsKey()
239 Map.Entry e4 = map.lowerEntry(zero);
251 Map.Entry e2 = map.higherEntry(zero);
275 Map.Entry e4 = map.floorEntry(zero);
287 Map.Entry e2 = map.ceilingEntry(zero);
598 assertFalse(map.containsKey(zero));
791 Map.Entry e4 = map.lowerEntry(zero);
803 Map.Entry e2 = map.higherEntry(zero);
827 Map.Entry e4 = map.floorEntry(zero);
[all …]
DConcurrentSkipListSubSetTest.java62 q.add(zero); in set5()
348 Object e4 = q.lower(zero); in testLower()
360 Object e2 = q.higher(zero); in testHigher()
384 Object e4 = q.floor(zero); in testFloor()
396 Object e2 = q.ceiling(zero); in testCeiling()
847 Object e4 = q.lower(zero); in testDescendingLower()
859 Object e2 = q.higher(zero); in testDescendingHigher()
883 Object e4 = q.floor(zero); in testDescendingFloor()
895 Object e2 = q.ceiling(zero); in testDescendingCeiling()
DTreeSubSetTest.java57 q.add(zero); in set5()
340 Object e4 = q.lower(zero); in testLower()
352 Object e2 = q.higher(zero); in testHigher()
376 Object e4 = q.floor(zero); in testFloor()
388 Object e2 = q.ceiling(zero); in testCeiling()
828 Object e4 = q.lower(zero); in testDescendingLower()
840 Object e2 = q.higher(zero); in testDescendingHigher()
864 Object e4 = q.floor(zero); in testDescendingFloor()
876 Object e2 = q.ceiling(zero); in testDescendingCeiling()
DTreeMapTest.java67 assertFalse(map.containsKey(zero)); in testContainsKey()
351 Map.Entry e4 = map.lowerEntry(zero);
363 Map.Entry e2 = map.higherEntry(zero);
387 Map.Entry e4 = map.floorEntry(zero);
399 Map.Entry e2 = map.ceilingEntry(zero);
423 Object e4 = q.lowerKey(zero);
435 Object e2 = q.higherKey(zero);
459 Object e4 = q.floorKey(zero);
471 Object e2 = q.ceilingKey(zero);
DConcurrentSkipListMapTest.java68 assertFalse(map.containsKey(zero)); in testContainsKey()
438 Map.Entry e4 = map.lowerEntry(zero);
450 Map.Entry e2 = map.higherEntry(zero);
474 Map.Entry e4 = map.floorEntry(zero);
486 Map.Entry e2 = map.ceilingEntry(zero);
508 e = map.higherEntry(zero);
542 Object e4 = q.lowerKey(zero);
554 Object e2 = q.higherKey(zero);
578 Object e4 = q.floorKey(zero);
590 Object e2 = q.ceilingKey(zero);
DConcurrentSkipListSubMapTest.java22 map.put(zero, "Z"); in map5()
90 assertFalse(map.containsKey(zero)); in testContainsKey()
353 Map.Entry e4 = map.lowerEntry(zero);
365 Map.Entry e2 = map.higherEntry(zero);
389 Map.Entry e4 = map.floorEntry(zero);
401 Map.Entry e2 = map.ceilingEntry(zero);
764 assertFalse(map.containsKey(zero));
1027 Map.Entry e4 = map.lowerEntry(zero);
1039 Map.Entry e2 = map.higherEntry(zero);
1063 Map.Entry e4 = map.floorEntry(zero);
[all …]
DAtomicReferenceArrayTest.java183 assertSame(one, aa.getAndSet(i, zero)); in testGetAndSet()
184 assertSame(zero, aa.getAndSet(i, m10)); in testGetAndSet()
DTreeSetTest.java179 assertTrue(q.add(zero)); in testAdd()
188 assertTrue(q.add(zero)); in testAddDup()
189 assertFalse(q.add(zero)); in testAddDup()
390 Object e4 = q.lower(zero); in testLower()
402 Object e2 = q.higher(zero); in testHigher()
426 Object e4 = q.floor(zero); in testFloor()
438 Object e2 = q.ceiling(zero); in testCeiling()
DConcurrentSkipListSetTest.java175 assertTrue(q.add(zero)); in testAdd()
184 assertTrue(q.add(zero)); in testAddDup()
185 assertFalse(q.add(zero)); in testAddDup()
386 Object e4 = q.lower(zero); in testLower()
398 Object e2 = q.higher(zero); in testHigher()
422 Object e4 = q.floor(zero); in testFloor()
434 Object e2 = q.ceiling(zero); in testCeiling()
DLinkedBlockingDequeTest.java457 assertTrue(q.offer(zero)); in testOffer()
1074 assertSame(zero, q.pollFirst(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollFirstWithOfferFirst()
1092 assertTrue(q.offerFirst(zero, LONG_DELAY_MS, MILLISECONDS)); in testTimedPollFirstWithOfferFirst()
1339 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS));
1358 assertTrue(q.offerLast(zero, LONG_DELAY_MS, MILLISECONDS));
1705 q.add(zero);
1708 assertTrue(q.contains(zero));
/libcore/luni/src/main/java/java/lang/
DStringToReal.java34 boolean zero; field in StringToReal.StringExponentPair
128 result.zero = true; in initialParse()
181 if (result.infinity || result.zero) { in initialParse()
216 result.zero = true; in initialParse()
283 if (info.infinity || info.zero) { in parseDouble()
324 if (info.infinity || info.zero) { in parseFloat()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DByteTest.java358 final Byte zero = new Byte((byte) 0); in test_compareToLjava_lang_Byte() local
363 assertTrue(zero.compareTo(zero) == 0); in test_compareToLjava_lang_Byte()
365 assertTrue(max.compareTo(zero) > 0); in test_compareToLjava_lang_Byte()
368 assertTrue(zero.compareTo(max) < 0); in test_compareToLjava_lang_Byte()
369 assertTrue(zero.compareTo(min) > 0); in test_compareToLjava_lang_Byte()
371 assertTrue(min.compareTo(zero) < 0); in test_compareToLjava_lang_Byte()

12