Home
last modified time | relevance | path

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

123

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerTest.java29 BigInteger zero = new BigInteger("0", 10); field in BigIntegerTest
89 assertTrue("Random number is negative", bi.compareTo(zero) >= 0); in test_ConstructorILjava_util_Random()
126 assertTrue("Incorrect value for zero", bi.equals(zero)); in test_ConstructorI$B()
212 assertTrue("0=0", zero.equals(BigInteger.valueOf(0))); in test_equalsLjava_lang_Object()
215 assertTrue("0=1", !zero.equals(one)); in test_equalsLjava_lang_Object()
216 assertTrue("0=-1", !zero.equals(minusOne)); in test_equalsLjava_lang_Object()
268 assertTrue("0+0", zero.add(zero).equals(zero)); in test_addLjava_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()
272 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/
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.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()
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 …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DThreadLocalTest.java58 return zero;
82 assertSame(itl.get(), zero); in testRemoveITL() local
86 assertSame(itl.get(), zero); in testRemoveITL() local
DConcurrentLinkedDequeTest.java238 assertTrue(q.offer(zero)); in testOffer()
240 assertSame(zero, q.peekFirst()); in testOffer()
249 assertTrue(q.offerFirst(zero)); in testOfferFirst()
252 assertSame(zero, q.peekLast()); in testOfferFirst()
260 assertTrue(q.offerLast(zero)); in testOfferLast()
262 assertSame(zero, q.peekFirst()); in testOfferLast()
304 assertTrue(q.add(zero)); in testAdd()
306 assertSame(zero, q.peekFirst()); in testAdd()
315 q.addFirst(zero); in testAddFirst()
318 assertSame(zero, q.peekLast()); in testAddFirst()
[all …]
DSynchronousQueueTest.java86 assertFalse(q.offer(zero)); in testEmptyFull()
287 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
308 try { assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); } in testTimedPollWithOffer()
361 assertFalse(q.contains(zero));
384 Integer[] ints = new Integer[1]; ints[0] = zero;
397 Integer[] ints = new Integer[1]; ints[0] = zero;
410 Integer[] ints = new Integer[1]; ints[0] = zero;
563 assertFalse(clone.offer(zero));
DArrayDequeTest.java267 assertTrue(q.offer(zero)); in testOffer()
269 assertSame(zero, q.peekFirst()); in testOffer()
278 assertTrue(q.offerFirst(zero)); in testOfferFirst()
281 assertSame(zero, q.peekLast()); in testOfferFirst()
289 assertTrue(q.offerLast(zero)); in testOfferLast()
291 assertSame(zero, q.peekFirst()); in testOfferLast()
333 assertTrue(q.add(zero)); in testAdd()
335 assertSame(zero, q.peekFirst()); in testAdd()
344 q.addFirst(zero); in testAddFirst()
347 assertSame(zero, q.peekLast()); in testAddFirst()
[all …]
DAtomicReferenceTest.java141 assertSame(one, ai.getAndSet(zero)); in testGetAndSet()
142 assertSame(zero, ai.getAndSet(m10)); in testGetAndSet()
DBlockingQueueTest.java242 final Object zero = makeElement(0); in testTimedPollWithOffer() local
251 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
272 assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
DTreeSubMapTest.java62 map.put(zero, "Z"); in map5()
130 assertFalse(map.containsKey(zero)); in testContainsKey()
281 Map.Entry e4 = map.lowerEntry(zero);
293 Map.Entry e2 = map.higherEntry(zero);
317 Map.Entry e4 = map.floorEntry(zero);
329 Map.Entry e2 = map.ceilingEntry(zero);
640 assertFalse(map.containsKey(zero));
833 Map.Entry e4 = map.lowerEntry(zero);
845 Map.Entry e2 = map.higherEntry(zero);
869 Map.Entry e4 = map.floorEntry(zero);
[all …]
/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/luni/src/test/java/libcore/java/util/
DTimSortTest.java69 final Integer zero = 0; in createBugTriggerData() local
74 bugTriggerData[i] = zero; in createBugTriggerData()
/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()

123