Home
last modified time | relevance | path

Searched refs:ZERO (Results 1 – 25 of 71) sorted by relevance

123

/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidEnumTest.java26 ZERO, ONE, TWO, THREE, FOUR {boolean isFour() { in isFour() enumConstant
40 assertTrue(MyEnum.ZERO.compareTo(MyEnum.ONE) < 0); in testEnum()
41 assertEquals(MyEnum.ZERO, MyEnum.ZERO); in testEnum()
53 e = MyEnum.ZERO; in testEnum()
56 case ZERO: in testEnum()
DProcessBuilderTest.java72 checkProcessExecution(pb, ResultCodes.ZERO, in assertRedirectErrorStream()
139 checkProcessExecution(pb, ResultCodes.ZERO, /* processInput */ "", in testRedirectFile_input()
148 checkProcessExecution(pb, ResultCodes.ZERO, processInput, in testRedirectFile_output()
180 checkProcessExecution(pb, ResultCodes.ZERO, testString, testString, ""); in testRedirectPipe_inputAndOutput()
186 checkProcessExecution(pb, ResultCodes.ZERO, testString, testString, ""); in testRedirectPipe_inputAndOutput()
193 checkProcessExecution(pb, ResultCodes.ZERO, "", testString + "\n", ""); in testRedirectPipe_inputAndOutput()
242 checkProcessExecution(pb, ResultCodes.ZERO, "", "android\n", ""); in testEnvironment()
455 ZERO { @Override void assertMatches(int actualResultCode) { in assertMatches() enumConstant
/libcore/ojluni/src/test/java/time/test/java/time/
DTestPeriod.java85 assertSame(Period.ZERO, Period.ZERO); in factory_zeroSingleton()
86 assertSame(Period.ofYears(0), Period.ZERO); in factory_zeroSingleton()
87 assertSame(Period.ofMonths(0), Period.ZERO); in factory_zeroSingleton()
88 assertSame(Period.ofDays(0), Period.ZERO); in factory_zeroSingleton()
89 assertSame(Period.of(0, 0, 0), Period.ZERO); in factory_zeroSingleton()
DTestDuration.java85 assertSame(t.plus(Duration.ZERO), t); in plus_zeroReturnsThis()
91 assertSame(t.plus(Duration.ofSeconds(1)), Duration.ZERO); in plus_zeroSingleton()
103 assertSame(t.plusSeconds(1), Duration.ZERO); in plusSeconds_zeroSingleton()
115 assertSame(t.plusMillis(998), Duration.ZERO); in plusMillis_zeroSingleton()
127 assertSame(t.plusNanos(998000000), Duration.ZERO); in plusNanos_zeroSingleton()
133 assertSame(t.minus(Duration.ZERO), t); in minus_zeroReturnsThis()
139 assertSame(t.minus(Duration.ofSeconds(1)), Duration.ZERO); in minus_zeroSingleton()
151 assertSame(t.minusSeconds(1), Duration.ZERO); in minusSeconds_zeroSingleton()
163 assertSame(t.minusMillis(1002), Duration.ZERO); in minusMillis_zeroSingleton()
175 assertSame(t.minusNanos(1002000000), Duration.ZERO); in minusNanos_zeroSingleton()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DOldBigIntegerTest.java52 assertTrue("Random number is negative", bi.compareTo(BigInteger.ZERO) >= 0); in test_ConstructorILjava_util_Random()
57 assertTrue("Not zero", new BigInteger(0, rand).equals(BigInteger.ZERO)); in test_ConstructorILjava_util_Random()
74 assertTrue(bi1 + " is negative", bi1.compareTo(BigInteger.ZERO) >= 0); in test_ConstructorIILjava_util_Random()
76 assertTrue(bi2 + " is negative", bi2.compareTo(BigInteger.ZERO) >= 0); in test_ConstructorIILjava_util_Random()
296 assertTrue("0+0", BigInteger.ZERO.add(BigInteger.ZERO).equals(BigInteger.ZERO)); in test_addLjava_math_BigInteger()
297 assertTrue("0+1", BigInteger.ZERO.add(BigInteger.ONE).equals(BigInteger.ONE)); in test_addLjava_math_BigInteger()
298 assertTrue("1+0", BigInteger.ONE.add(BigInteger.ZERO).equals(BigInteger.ONE)); in test_addLjava_math_BigInteger()
300 assertTrue("0+(-1)", BigInteger.ZERO.add(minusOne).equals(minusOne)); in test_addLjava_math_BigInteger()
301 assertTrue("(-1)+0", minusOne.add(BigInteger.ZERO).equals(minusOne)); in test_addLjava_math_BigInteger()
303 assertTrue("1+(-1)", BigInteger.ONE.add(minusOne).equals(BigInteger.ZERO)); in test_addLjava_math_BigInteger()
[all …]
DBigIntegerCompareTest.java191 BigInteger bNumber = BigInteger.ZERO; in testCompareToPosZero()
202 BigInteger aNumber = BigInteger.ZERO; in testCompareToZeroPos()
215 BigInteger bNumber = BigInteger.ZERO; in testCompareToNegZero()
226 BigInteger aNumber = BigInteger.ZERO; in testCompareToZeroNeg()
236 BigInteger aNumber = BigInteger.ZERO; in testCompareToZeroZero()
237 BigInteger bNumber = BigInteger.ZERO; in testCompareToZeroZero()
365 BigInteger bNumber = BigInteger.ZERO; in testMaxNegZero()
447 BigInteger bNumber = BigInteger.ZERO; in testMinPosZero()
496 BigInteger aNumber = BigInteger.ZERO; in testNegateZero()
530 BigInteger aNumber = BigInteger.ZERO; in testSignumZero()
DBigIntegerTest.java100 assertTrue("Not zero", new BigInteger(0, rand).equals(BigInteger.ZERO)); in test_ConstructorILjava_util_Random()
110 assertTrue("Incorrect value for pos number", bi.equals(BigInteger.ZERO in test_Constructor$B()
124 assertTrue("Incorrect value for pos number", bi.equals(BigInteger.ZERO in test_ConstructorI$B()
127 assertTrue("Incorrect value for neg number", bi.equals(BigInteger.ZERO in test_ConstructorI$B()
384 .compareTo(BigInteger.ZERO) >= 0); in test_modInverseLjava_math_BigInteger()
405 .compareTo(BigInteger.ZERO) >= 0); in test_modInverseLjava_math_BigInteger()
421 BigInteger.ZERO)); in test_shiftRightI()
423 BigInteger.ZERO)); in test_shiftRightI()
425 BigInteger.ZERO)); in test_shiftRightI()
427 BigInteger.ZERO)); in test_shiftRightI()
[all …]
DBigIntegerModPowTest.java51 BigInteger.ZERO.modPow(new BigInteger("-1"), new BigInteger("10")); in testModPowException()
121 + ") should be " + BigInteger.ZERO, BigInteger.ZERO, in testModPowZeroExp()
286 BigInteger aNumber = BigInteger.ZERO; in testGcdFirstZERO()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
DDHPrivateKeySpecTest.java42 BigInteger[] xs = {new BigInteger("-1000000000000"), BigInteger.ZERO, in testDHPrivateKeySpec()
44 BigInteger[] ps = {new BigInteger("-1000000000000"), BigInteger.ZERO, in testDHPrivateKeySpec()
46 BigInteger[] gs = {new BigInteger("-1000000000000"), BigInteger.ZERO, in testDHPrivateKeySpec()
DDHPublicKeySpecTest.java42 BigInteger[] ys = {new BigInteger("-1000000000000"), BigInteger.ZERO, in testDHPrivateKeySpec()
44 BigInteger[] ps = {new BigInteger("-1000000000000"), BigInteger.ZERO, in testDHPrivateKeySpec()
46 BigInteger[] gs = {new BigInteger("-1000000000000"), BigInteger.ZERO, in testDHPrivateKeySpec()
DDHParameterSpecTest.java44 BigInteger[] ps = {new BigInteger("-1000000000000"), BigInteger.ZERO, in testDHParameterSpec()
46 BigInteger[] gs = {new BigInteger("-1000000000000"), BigInteger.ZERO, in testDHParameterSpec()
/libcore/luni/src/test/java/tests/security/spec/
DECPointTest.java47 new ECPoint(BigInteger.ZERO, BigInteger.ZERO); in testECPoint01()
64 new ECPoint(null, BigInteger.ZERO); in testECPoint02()
72 new ECPoint(BigInteger.ZERO, null); in testECPoint02()
184 p2 = new ECPoint(BigInteger.valueOf(-23456L), BigInteger.ZERO); in testEqualsObject02()
189 p2 = new ECPoint(BigInteger.valueOf(-23456L), BigInteger.ZERO); in testEqualsObject02()
DRSAMultiPrimePrivateCrtKeySpecTest.java595 opi1[2] = new RSAOtherPrimeInfo(BigInteger.ZERO, in testIsStatePreserved1()
596 BigInteger.ZERO, in testIsStatePreserved1()
597 BigInteger.ZERO); in testIsStatePreserved1()
628 ret[2] = new RSAOtherPrimeInfo(BigInteger.ZERO, in testIsStatePreserved2()
629 BigInteger.ZERO, in testIsStatePreserved2()
630 BigInteger.ZERO); in testIsStatePreserved2()
/libcore/luni/src/test/java/libcore/java/math/
DBigIntegerTest.java220 try_gcd_variants(BigInteger.TEN, BigInteger.ZERO, BigInteger.TEN); in test_gcd()
221 try_gcd_variants(BigInteger.ZERO, BigInteger.ZERO, BigInteger.ZERO); in test_gcd()
227 try_gcd_variants(large, BigInteger.ZERO, large); in test_gcd()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKInstantPrinterParser.java229 assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); in test_parse_digitsMinusOne()
239 assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); in test_parse_digitsNine()
258 assertEquals(parsed.query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); in test_parse_endOfDay()
270 assertEquals(parsed.query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); in test_parse_leapSecond()
/libcore/luni/src/test/java/libcore/java/time/
DDurationTest.java49 assertSame(Instant.EPOCH, Duration.ZERO.addTo(Instant.EPOCH)); in test_addTo()
63 assertSame(Instant.EPOCH, Duration.ZERO.subtractFrom(Instant.EPOCH)); in test_subtractFrom()
142 assertSame(temporal, Duration.ZERO.addTo(temporal)); in test_addTo_subtractFrom_unsupported()
143 assertSame(temporal, Duration.ZERO.subtractFrom(temporal)); in test_addTo_subtractFrom_unsupported()
DPeriodTest.java34 assertSame(IsoChronology.INSTANCE, Period.ZERO.getChronology()); in test_getChronology()
/libcore/luni/src/test/java/libcore/java/util/
DComparatorTest.java28 private static final Item ZERO = new Item(0); field in ComparatorTest
39 private final List<Item> orderedItems = listOf(ZERO, ONE, TWO, THREE, FOUR);
40 private final List<Item> nullsFirstItems = listOf(null, ZERO, ONE, TWO, THREE, FOUR);
41 private final List<Item> nullsLastItems = listOf(ZERO, ONE, TWO, THREE, FOUR, null);
/libcore/ojluni/src/test/java/time/tck/java/time/serial/
DTCKPeriodSerialization.java76 assertSerializable(Period.ZERO); in test_serialization()
DTCKDurationSerialization.java110 assertSerializableSame(Duration.ZERO); in test_deserializationSingleton()
/libcore/ojluni/src/main/java/java/time/
DPeriod.java135 public static final Period ZERO = new Period(0, 0, 0); field in Period
393 return ZERO; in create()
479 return (this == ZERO); in isZero()
783 if (this == ZERO || scalar == 1) { in multipliedBy()
1016 if (this == ZERO) { in toString()
DDuration.java133 public static final Duration ZERO = new Duration(0, 0); field in Duration
302 return ZERO.plus(amount, unit); in of()
328 Duration duration = ZERO; in from()
494 return ZERO; in create()
952 return ZERO; in multipliedBy()
1261 if (this == ZERO) { in toString()
/libcore/luni/src/test/java/tests/security/interfaces/
DDSAParamsTest.java28 private final BigInteger g = BigInteger.ZERO;
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKClock_Offset.java96 Clock test = Clock.offset(underlying, Duration.ZERO); in test_offset_ClockDuration_zeroDuration()
102 Clock.offset(null, Duration.ZERO); in test_offset_ClockDuration_nullClock()
/libcore/luni/src/main/java/java/math/
DLogical.java44 return BigInteger.ZERO; in not()
84 return BigInteger.ZERO; in and()
117 return BigInteger.ZERO; in andPositive()
137 return BigInteger.ZERO; in andDiffSigns()
223 return BigInteger.ZERO; in andNot()
229 return BigInteger.ZERO; in andNot()
377 return BigInteger.ZERO; in andNotNegative()

123