/libcore/luni/src/test/java/tests/security/spec/ |
D | RSAMultiPrimePrivateCrtKeySpecTest.java | 44 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE), 45 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE), 46 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE) 68 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01() 69 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01() 70 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01() 71 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01() 72 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01() 73 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01() 74 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01() [all …]
|
D | RSAPrivateCrtKeySpecTest.java | 47 BigInteger.ONE, in testRSAPrivateCrtKeySpec01() 48 BigInteger.ONE, in testRSAPrivateCrtKeySpec01() 49 BigInteger.ONE, in testRSAPrivateCrtKeySpec01() 50 BigInteger.ONE, in testRSAPrivateCrtKeySpec01() 51 BigInteger.ONE, in testRSAPrivateCrtKeySpec01() 52 BigInteger.ONE, in testRSAPrivateCrtKeySpec01() 53 BigInteger.ONE, in testRSAPrivateCrtKeySpec01() 54 BigInteger.ONE); in testRSAPrivateCrtKeySpec01() 65 BigInteger.ONE, in testRSAPrivateCrtKeySpec02() 66 BigInteger.ONE, in testRSAPrivateCrtKeySpec02() [all …]
|
D | EllipticCurveTest.java | 45 BigInteger a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01() 61 a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01() 79 BigInteger a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02() 102 a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02() 253 BigInteger a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigInteger01() 268 a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigInteger01() 285 BigInteger a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigInteger02() 306 a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigInteger02() 441 .valueOf(4L), BigInteger.ONE); in testEllipticCurveECFieldBigIntegerBigInteger05() 443 assertEquals("incorrect b", ec.getB(), BigInteger.ONE); in testEllipticCurveECFieldBigIntegerBigInteger05() [all …]
|
D | ECPointTest.java | 151 new ECPoint(BigInteger.valueOf(-23456L), BigInteger.ONE); in testEqualsObject01() 155 p1 = new ECPoint(BigInteger.valueOf(-23456L), BigInteger.ONE); in testEqualsObject01() 174 new ECPoint(BigInteger.valueOf(-23456L), BigInteger.ONE); in testEqualsObject02() 178 p1 = new ECPoint(BigInteger.valueOf(-23457L), BigInteger.ONE); in testEqualsObject02() 183 p1 = new ECPoint(BigInteger.valueOf(-23457L), BigInteger.ONE); in testEqualsObject02() 200 ECPoint f = new ECPoint(BigInteger.valueOf(-23457L), BigInteger.ONE); in testHashCode01() 231 ECPoint p1 = new ECPoint(BigInteger.valueOf(-23456L), BigInteger.ONE); in testHashCode02()
|
/libcore/ojluni/src/test/java/math/BigInteger/ |
D | LargeValueExceptions.java | 34 import static java.math.BigInteger.ONE; 72 BigInteger x = ONE.shiftLeft(16*MAX_INTS - 1).subtract(ONE); in squareNoOverflow() 79 BigInteger x = ONE.shiftLeft(16*MAX_INTS - 1); in squareIndefiniteOverflowSuccess() 86 BigInteger x = ONE.shiftLeft(16*MAX_INTS).subtract(ONE); in squareIndefiniteOverflowFailure() 96 BigInteger x = ONE.shiftLeft(16*MAX_INTS); in squareDefiniteOverflow() 107 BigInteger x = ONE.shiftLeft(halfMaxBits).subtract(ONE); in multiplyNoOverflow() 108 BigInteger y = ONE.shiftLeft(halfMaxBits - 1).subtract(ONE); in multiplyNoOverflow() 115 BigInteger x = ONE.shiftLeft((int)(MAX_BITS/2) - 1); in multiplyIndefiniteOverflowSuccess() 118 BigInteger y = ONE.shiftLeft((int)(MAX_BITS/2) - 1); in multiplyIndefiniteOverflowSuccess() 131 BigInteger x = ONE.shiftLeft((int)(MAX_BITS/2)).subtract(ONE); in multiplyIndefiniteOverflowFailure() [all …]
|
D | CompareToTests.java | 43 final BigInteger MINUS_ONE = BigInteger.ONE.negate(); in compareToTests() 44 final BigInteger TWO_POW_126 = ONE.shiftLeft(126); in compareToTests() 45 final BigInteger TWO_POW_127 = ONE.shiftLeft(127); in compareToTests() 46 final BigInteger TWO_POW_128 = ONE.shiftLeft(128); in compareToTests() 54 {valueOf(2), valueOf(1), ONE}, in compareToTests() 61 {TWO_POW_128.or(TWO_POW_126), TWO_POW_128, ONE}, in compareToTests() 62 {TWO_POW_128.or(TWO_POW_126), TWO_POW_128.negate(), ONE}, in compareToTests() 70 {TWO_POW_128, TWO_POW_127, ONE}, in compareToTests() 81 {valueOf(Long.MIN_VALUE).negate(), valueOf(Long.MAX_VALUE), ONE}, in compareToTests() 86 {valueOf(Long.MAX_VALUE), valueOf(Long.MIN_VALUE), ONE}, in compareToTests() [all …]
|
D | BigIntegerTest.java | 248 BigInteger n = BigInteger.ONE.negate(); in squareRootSmall() 264 checkResult(BigInteger.ONE, BigInteger.valueOf(small).sqrt(), "sqrt("+small+") != 1"); in squareRootSmall() 278 BigInteger n2up = n2.add(BigInteger.ONE); in squareRoot() 282 BigInteger up = n.add(BigInteger.ONE).pow(2).subtract(BigInteger.ONE); in squareRoot() 291 Assert.assertFalse(s.add(BigInteger.ONE).pow(2).compareTo(n) <= 0, in squareRoot() 299 BigInteger p2 = BigInteger.ONE.shiftLeft(i); in squareRoot() 300 sb.add(p2.subtract(BigInteger.ONE)); in squareRoot() 302 sb.add(p2.add(BigInteger.ONE)); in squareRoot() 305 sb.add((new BigDecimal(Double.MAX_VALUE)).toBigInteger().add(BigInteger.ONE)); in squareRoot() 331 BigInteger n2up = n2.add(BigInteger.ONE); in squareRootAndRemainder() [all …]
|
D | PrimitiveConversionTests.java | 25 import static java.math.BigInteger.ONE; 56 BigInteger x = ONE.shiftLeft(exponent); 57 for (BigInteger y : Arrays.asList(x, x.add(ONE), x.subtract(ONE))) {
|
D | BitLengthOverflow.java | 54 BigInteger x = BigInteger.ONE.shiftLeft(Integer.MAX_VALUE); in main() 62 BigInteger a = BigInteger.ONE.shiftLeft(1073742825); in main() 63 BigInteger b = BigInteger.ONE.shiftLeft(1073742825); in main()
|
D | TestValueExact.java | 49 BigInteger.valueOf(Long.MIN_VALUE).subtract(BigInteger.ONE), in testLongValueExact() 50 BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE) in testLongValueExact() 73 BigInteger.ONE, in testIntValueExact() 103 BigInteger.ONE, in testShortValueExact() 137 BigInteger.ONE, in testByteValueExact()
|
/libcore/luni/src/test/java/tests/security/interfaces/ |
D | RSAMultiPrimePrivateCrtKeyTest.java | 33 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE), 34 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE), 35 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE) 38 private final BigInteger publicExponent = BigInteger.ONE; 39 private final BigInteger primeExponentP = BigInteger.ONE; 40 private final BigInteger primeExponentQ = BigInteger.ONE; 41 private final BigInteger primeP = BigInteger.ONE; 42 private final BigInteger primeQ = BigInteger.ONE; 43 private final BigInteger crtCoefficient = BigInteger.ONE;
|
/libcore/ojluni/src/test/java/util/StringJoiner/ |
D | StringJoinerTest.java | 42 private static final String ONE = "One"; field in StringJoinerTest 43 private static final int ONE_LEN = ONE.length(); 53 sj.add(ONE); in addAddAll() 60 String expected = "{"+ONE+DASH+TWO+DASH+THREE+"}"; in addAddAll() 70 firstOne.add(ONE); in addAlladd() 76 String expected = "{"+ONE+DASH+TWO+DASH+THREE+"}"; in addAlladd() 84 firstOne.add(ONE); in addAlladdAll() 94 String expected = "{"+ONE+DASH+TWO+DASH+THREE+DASH+FOUR+DASH+FIVE+"}"; in addAlladdAll() 100 CharSequence cs_one = ONE; in addCharSequence() 106 assertEquals(sj.toString(), ONE + "," + TWO); in addCharSequence() [all …]
|
/libcore/ojluni/src/test/java/math/BigDecimal/ |
D | CompareToTests.java | 43 final BigDecimal MINUS_ONE = BigDecimal.ONE.negate(); in compareToTests() 51 {valueOf(2), valueOf(1), ONE}, in compareToTests() 56 {valueOf(2,-1), valueOf(2), ONE}, in compareToTests() 58 {valueOf(1,-1), valueOf(2), ONE}, in compareToTests() 59 {valueOf(5,-1), valueOf(2), ONE}, in compareToTests() 69 {valueOf(Long.MIN_VALUE).negate(), valueOf(Long.MAX_VALUE), ONE}, in compareToTests() 74 {valueOf(Long.MAX_VALUE), valueOf(Long.MIN_VALUE), ONE}, in compareToTests() 75 {valueOf(Long.MAX_VALUE).negate(), valueOf(Long.MIN_VALUE), ONE}, in compareToTests() 77 {valueOf(Long.MAX_VALUE-1), valueOf(Long.MIN_VALUE), ONE}, in compareToTests() 78 {valueOf(Long.MAX_VALUE-1).negate(), valueOf(Long.MIN_VALUE), ONE}, in compareToTests() [all …]
|
D | ScaleByPowerOfTenTests.java | 43 BigDecimal bd = BigDecimal.ONE.scaleByPowerOfTen(i); in testScaleByPowerOfTen() 46 expected = new BigDecimal(BigInteger.ONE, -i); in testScaleByPowerOfTen() 52 bd = BigDecimal.ONE.negate().scaleByPowerOfTen(i); in testScaleByPowerOfTen() 53 expected = new BigDecimal(BigInteger.ONE.negate(), -i); in testScaleByPowerOfTen()
|
D | ConstructorUnscaledValue.java | 36 TestBigInteger tbi = new TestBigInteger(BigInteger.ONE); in main() 50 if (!unscaledValue.equals(BigInteger.ONE)) { in main()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldAndroidEnumTest.java | 26 ZERO, ONE, TWO, THREE, FOUR {boolean isFour() { in isFour() enumConstant 40 assertTrue(MyEnum.ZERO.compareTo(MyEnum.ONE) < 0); in testEnum() 42 assertTrue(MyEnum.TWO.compareTo(MyEnum.ONE) > 0); in testEnum() 43 assertTrue(MyEnum.FOUR.compareTo(MyEnum.ONE) > 0); in testEnum() 45 assertEquals("ONE", MyEnum.ONE.name()); in testEnum() 46 assertSame(MyEnum.ONE.getDeclaringClass(), MyEnum.class); in testEnum()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | OldBigIntegerTest.java | 209 BigInteger wpMinusOne = wp.subtract(BigInteger.ONE); in largePrimesProduct() 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() 299 assertTrue("1+1", BigInteger.ONE.add(BigInteger.ONE).equals(two)); in test_addLjava_math_BigInteger() 303 assertTrue("1+(-1)", BigInteger.ONE.add(minusOne).equals(BigInteger.ZERO)); in test_addLjava_math_BigInteger() 304 assertTrue("(-1)+1", minusOne.add(BigInteger.ONE).equals(BigInteger.ZERO)); in test_addLjava_math_BigInteger() 319 BigInteger increment = BigInteger.ONE; in test_addLjava_math_BigInteger()
|
/libcore/benchmarks/src/benchmarks/ |
D | SmallBigIntegerBenchmark.java | 48 if (x.and(BigInteger.ONE).equals(BigInteger.ONE)) { in main() 49 x = x.multiply(BIG_THREE).add(BigInteger.ONE); in main()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
D | DHPrivateKeySpecTest.java | 43 BigInteger.ONE, new BigInteger("1000000000000")}; in testDHPrivateKeySpec() 45 BigInteger.ONE, new BigInteger("1000000000000")}; in testDHPrivateKeySpec() 47 BigInteger.ONE, new BigInteger("1000000000000")}; in testDHPrivateKeySpec()
|
D | DHPublicKeySpecTest.java | 43 BigInteger.ONE, new BigInteger("1000000000000")}; in testDHPrivateKeySpec() 45 BigInteger.ONE, new BigInteger("1000000000000")}; in testDHPrivateKeySpec() 47 BigInteger.ONE, new BigInteger("1000000000000")}; in testDHPrivateKeySpec()
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | BigIntegerTest.java | 226 try_gcd_variants(large, BigInteger.valueOf(5), BigInteger.ONE); in test_gcd() 242 BigInteger.ONE.shiftLeft(1000).byteValueExact(); in test_byteValueExact() 246 BigInteger.ONE.negate().shiftLeft(1000).byteValueExact(); in test_byteValueExact() 263 BigInteger.ONE.shiftLeft(1000).shortValueExact(); in test_shortValueExact() 267 BigInteger.ONE.negate().shiftLeft(1000).shortValueExact(); in test_shortValueExact() 284 BigInteger.ONE.shiftLeft(1000).intValueExact(); in test_intValueExact() 288 BigInteger.ONE.negate().shiftLeft(1000).intValueExact(); in test_intValueExact() 308 BigInteger.ONE.shiftLeft(1000).longValueExact(); in test_longValueExact() 312 BigInteger.ONE.negate().shiftLeft(1000).longValueExact(); in test_longValueExact()
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | EmptyNavigableSet.java | 301 subSet.subSet(first, false, BigInteger.ONE, false); in testSubSetRanges() 306 NavigableSet subSet = navigableSet.headSet(BigInteger.ONE, true); in testheadSetRanges() 309 subSet.headSet(BigInteger.ONE, true); in testheadSetRanges() 312 NavigableSet ns = subSet.headSet(BigInteger.ONE, false); in testheadSetRanges() 316 () -> ns.headSet(BigInteger.ONE, true), in testheadSetRanges() 325 NavigableSet subSet = navigableSet.tailSet(BigInteger.ONE, true); in testTailSetRanges() 328 subSet.tailSet(BigInteger.ONE, true); in testTailSetRanges() 331 NavigableSet ns = subSet.tailSet(BigInteger.ONE, false); in testTailSetRanges() 335 () -> ns.tailSet(BigInteger.ONE, true), in testTailSetRanges()
|
D | EmptyNavigableMap.java | 281 subMap.subMap(first, false, BigInteger.ONE, false); in testSubMapRanges() 286 NavigableMap subMap = navigableMap.headMap(BigInteger.ONE, true); in testheadMapRanges() 289 subMap.headMap(BigInteger.ONE, true); in testheadMapRanges() 292 NavigableMap ns = subMap.headMap(BigInteger.ONE, false); in testheadMapRanges() 296 () -> ns.headMap(BigInteger.ONE, true), in testheadMapRanges() 305 NavigableMap subMap = navigableMap.tailMap(BigInteger.ONE, true); in testTailMapRanges() 308 subMap.tailMap(BigInteger.ONE, true); in testTailMapRanges() 311 NavigableMap ns = subMap.tailMap(BigInteger.ONE, false); in testTailMapRanges() 315 () -> ns.tailMap(BigInteger.ONE, true), in testTailMapRanges()
|
/libcore/luni/src/test/java/libcore/java/security/spec/ |
D | XECPublicKeySpecTest.java | 38 keySpec = new XECPublicKeySpec(MGF1ParameterSpec.SHA512, BigInteger.ONE); in testConstructor() 40 assertEquals(BigInteger.ONE, keySpec.getU()); in testConstructor()
|
/libcore/ojluni/src/test/java/lang/StrictMath/ |
D | FdlibmTranslit.java | 288 private static final double ONE = 1.0; field in FdlibmTranslit.Exp 348 if (HUGE + x > ONE) { in compute() 349 return ONE + x;/* trigger inexact */ in compute() 359 return ONE - ((x * c) / (c - 2.0) - x); in compute() 361 y = ONE - ((lo - (x * c) / (2.0 - c)) - hi); in compute()
|