Home
last modified time | relevance | path

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

12

/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/luni/src/test/java/libcore/java/lang/
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()
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()
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.java40 final long zero = 0L; in testCompare() local
44 assertTrue(Long.compare(zero, zero) == 0); in testCompare()
45 assertTrue(Long.compare(max, zero) > 0); in testCompare()
47 assertTrue(Long.compare(zero, max) < 0); in testCompare()
48 assertTrue(Long.compare(zero, min) > 0); in testCompare()
49 assertTrue(Long.compare(min, zero) < 0); in testCompare()
/libcore/jsr166-tests/src/test/java/jsr166/
DThreadLocalTest.java34 return zero;
58 assertSame(itl.get(), zero); in testRemoveITL() local
62 assertSame(itl.get(), zero); in testRemoveITL() local
DConcurrentLinkedDequeTest.java204 assertTrue(q.offer(zero)); in testOffer()
206 assertSame(zero, q.peekFirst()); in testOffer()
215 assertTrue(q.offerFirst(zero)); in testOfferFirst()
218 assertSame(zero, q.peekLast()); in testOfferFirst()
226 assertTrue(q.offerLast(zero)); in testOfferLast()
228 assertSame(zero, q.peekFirst()); in testOfferLast()
270 assertTrue(q.add(zero)); in testAdd()
272 assertSame(zero, q.peekFirst()); in testAdd()
281 q.addFirst(zero); in testAddFirst()
284 assertSame(zero, q.peekLast()); in testAddFirst()
[all …]
DSynchronousQueueTest.java65 assertFalse(q.offer(zero)); in testEmptyFull()
266 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
287 try { assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); } in testTimedPollWithOffer()
340 assertFalse(q.contains(zero));
363 Integer[] ints = new Integer[1]; ints[0] = zero;
376 Integer[] ints = new Integer[1]; ints[0] = zero;
389 Integer[] ints = new Integer[1]; ints[0] = zero;
543 assertFalse(clone.offer(zero));
DArrayDequeTest.java200 assertTrue(q.offer(zero)); in testOffer()
202 assertSame(zero, q.peekFirst()); in testOffer()
211 assertTrue(q.offerFirst(zero)); in testOfferFirst()
214 assertSame(zero, q.peekLast()); in testOfferFirst()
222 assertTrue(q.offerLast(zero)); in testOfferLast()
224 assertSame(zero, q.peekFirst()); in testOfferLast()
266 assertTrue(q.add(zero)); in testAdd()
268 assertSame(zero, q.peekFirst()); in testAdd()
277 q.addFirst(zero); in testAddFirst()
280 assertSame(zero, q.peekLast()); in testAddFirst()
[all …]
DAtomicReferenceTest.java118 assertSame(one, ai.getAndSet(zero)); in testGetAndSet()
119 assertSame(zero, ai.getAndSet(m10)); in testGetAndSet()
DAtomicReferenceFieldUpdaterTest.java241 assertSame(one, a.getAndSet(this, zero)); in testGetAndSet()
242 assertSame(zero, a.getAndSet(this, m10)); in testGetAndSet()
DBlockingQueueTest.java218 final Object zero = makeElement(0); in testTimedPollWithOffer() local
227 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
248 assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
DTreeSubMapTest.java39 map.put(zero, "Z"); in map5()
107 assertFalse(map.containsKey(zero)); in testContainsKey()
258 Map.Entry e4 = map.lowerEntry(zero);
270 Map.Entry e2 = map.higherEntry(zero);
294 Map.Entry e4 = map.floorEntry(zero);
306 Map.Entry e2 = map.ceilingEntry(zero);
617 assertFalse(map.containsKey(zero));
810 Map.Entry e4 = map.lowerEntry(zero);
822 Map.Entry e2 = map.higherEntry(zero);
846 Map.Entry e4 = map.floorEntry(zero);
[all …]
DConcurrentSkipListSubSetTest.java68 q.add(zero); in set5()
353 Object e4 = q.lower(zero); in testLower()
365 Object e2 = q.higher(zero); in testHigher()
389 Object e4 = q.floor(zero); in testFloor()
401 Object e2 = q.ceiling(zero); in testCeiling()
843 Object e4 = q.lower(zero); in testDescendingLower()
855 Object e2 = q.higher(zero); in testDescendingHigher()
879 Object e4 = q.floor(zero); in testDescendingFloor()
891 Object e2 = q.ceiling(zero); in testDescendingCeiling()
DTreeSubSetTest.java68 q.add(zero); in set5()
350 Object e4 = q.lower(zero); in testLower()
362 Object e2 = q.higher(zero); in testHigher()
386 Object e4 = q.floor(zero); in testFloor()
398 Object e2 = q.ceiling(zero); in testCeiling()
829 Object e4 = q.lower(zero); in testDescendingLower()
841 Object e2 = q.higher(zero); in testDescendingHigher()
865 Object e4 = q.floor(zero); in testDescendingFloor()
877 Object e2 = q.ceiling(zero); in testDescendingCeiling()
DConcurrentSkipListSubMapTest.java40 map.put(zero, "Z"); in map5()
108 assertFalse(map.containsKey(zero)); in testContainsKey()
371 Map.Entry e4 = map.lowerEntry(zero);
383 Map.Entry e2 = map.higherEntry(zero);
407 Map.Entry e4 = map.floorEntry(zero);
419 Map.Entry e2 = map.ceilingEntry(zero);
782 assertFalse(map.containsKey(zero));
1045 Map.Entry e4 = map.lowerEntry(zero);
1057 Map.Entry e2 = map.higherEntry(zero);
1081 Map.Entry e4 = map.floorEntry(zero);
[all …]
DConcurrentSkipListMapTest.java89 assertFalse(map.containsKey(zero)); in testContainsKey()
459 Map.Entry e4 = map.lowerEntry(zero);
471 Map.Entry e2 = map.higherEntry(zero);
495 Map.Entry e4 = map.floorEntry(zero);
507 Map.Entry e2 = map.ceilingEntry(zero);
529 e = map.higherEntry(zero);
563 Object e4 = q.lowerKey(zero);
575 Object e2 = q.higherKey(zero);
599 Object e4 = q.floorKey(zero);
611 Object e2 = q.ceilingKey(zero);
DTreeMapTest.java88 assertFalse(map.containsKey(zero)); in testContainsKey()
372 Map.Entry e4 = map.lowerEntry(zero);
384 Map.Entry e2 = map.higherEntry(zero);
408 Map.Entry e4 = map.floorEntry(zero);
420 Map.Entry e2 = map.ceilingEntry(zero);
444 Object e4 = q.lowerKey(zero);
456 Object e2 = q.higherKey(zero);
480 Object e4 = q.floorKey(zero);
492 Object e2 = q.ceilingKey(zero);
DTreeSetTest.java189 assertTrue(q.add(zero)); in testAdd()
198 assertTrue(q.add(zero)); in testAddDup()
199 assertFalse(q.add(zero)); in testAddDup()
399 Object e4 = q.lower(zero); in testLower()
411 Object e2 = q.higher(zero); in testHigher()
435 Object e4 = q.floor(zero); in testFloor()
447 Object e2 = q.ceiling(zero); in testCeiling()
/libcore/luni/src/test/java/libcore/java/util/
DTimSortTest.java69 final Integer zero = 0; in createBugTriggerData() local
74 bugTriggerData[i] = zero; in createBugTriggerData()
/libcore/ojluni/src/main/java/sun/invoke/util/
DWrapper.java47 private final Object zero; field in Wrapper
53 …private Wrapper(Class<?> wtype, Class<?> ptype, char tchar, Object zero, Object emptyArray, int fo… in Wrapper() argument
57 this.zero = zero; in Wrapper()
68 basicTypeChar, zero, in detailString()
225 public Object zero() { return zero; } in zero() method in Wrapper
231 public <T> T zero(Class<T> type) { return convert(zero, type); } in zero() method in Wrapper
476 T z = (T) zero; in convert()
/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()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKOffsetPrinterParser.java267 String zero = null; in test_print_pattern_x() local
270 zero = "+00"; in test_print_pattern_x()
273 zero = "+0000"; in test_print_pattern_x()
276 zero = "+00:00"; in test_print_pattern_x()
279 zero = "+0000"; in test_print_pattern_x()
282 zero = "+00:00"; in test_print_pattern_x()
288 assertEquals(output, (expected.equals("Z") ? zero : expected)); in test_print_pattern_x()
/libcore/luni/src/test/java/libcore/java/math/
DBigDecimalTest.java117 BigDecimal zero = BigDecimal.ZERO; in test191227() local
118 zero = zero.setScale(2, RoundingMode.HALF_EVEN); in test191227()
123 assertFalse(zero.equals(other)); in test191227()
124 assertFalse(other.equals(zero)); in test191227()

12