/libcore/luni/src/test/java/libcore/java/math/ |
D | OldBigDecimalConstructorsTest.java | 39 MathContext mc = new MathContext(precision, rm); in testConstrBigIntegerMathContext() local 42 BigDecimal result = new BigDecimal(bA, mc); in testConstrBigIntegerMathContext() 52 mc = new MathContext(31, RoundingMode.UP); in testConstrBigIntegerMathContext() 53 bd = new BigDecimal(bi, mc); in testConstrBigIntegerMathContext() 55 bd = new BigDecimal(nbi, mc); in testConstrBigIntegerMathContext() 58 mc = new MathContext(28, RoundingMode.DOWN); in testConstrBigIntegerMathContext() 59 bd = new BigDecimal(bi, mc); in testConstrBigIntegerMathContext() 61 bd = new BigDecimal(nbi, mc); in testConstrBigIntegerMathContext() 64 mc = new MathContext(33, RoundingMode.CEILING); in testConstrBigIntegerMathContext() 65 bd = new BigDecimal(bi, mc); in testConstrBigIntegerMathContext() [all …]
|
D | OldBigDecimalArithmeticTest.java | 29 MathContext mc; in testAddMathContextNonTrivial() local 32 mc = new MathContext(17, RoundingMode.FLOOR); in testAddMathContextNonTrivial() 36 a.round(mc).toString()); in testAddMathContextNonTrivial() 38 b.round(mc).toString()); in testAddMathContextNonTrivial() 40 a.round(mc).add(b.round(mc)).toString()); in testAddMathContextNonTrivial() 41 res = a.add(b, mc); in testAddMathContextNonTrivial() 44 mc = new MathContext(33, RoundingMode.UNNECESSARY); in testAddMathContextNonTrivial() 47 res = a.add(b, mc); in testAddMathContextNonTrivial() 54 MathContext mc; in testSubtractMathContextNonTrivial() local 57 mc = new MathContext(17, RoundingMode.FLOOR); in testSubtractMathContextNonTrivial() [all …]
|
D | OldBigDecimalCompareTest.java | 35 MathContext mc = new MathContext(34, RoundingMode.UP); in testAbsMathContextNeg() local 36 …assertEquals("incorrect value", "1.238096483923847545735673567457357E+53", aNumber.abs(mc).toStrin… in testAbsMathContextNeg() 38 mc = new MathContext(34, RoundingMode.DOWN); in testAbsMathContextNeg() 39 …assertEquals("incorrect value", "1.238096483923847545735673567457356E+53", aNumber.abs(mc).toStrin… in testAbsMathContextNeg() 41 mc = new MathContext(34, RoundingMode.FLOOR); in testAbsMathContextNeg() 42 …assertEquals("incorrect value", "1.238096483923847545735673567457356E+53", aNumber.abs(mc).toStrin… in testAbsMathContextNeg() 44 mc = new MathContext(34, RoundingMode.CEILING); in testAbsMathContextNeg() 45 …assertEquals("incorrect value", "1.238096483923847545735673567457357E+53", aNumber.abs(mc).toStrin… in testAbsMathContextNeg() 47 mc = new MathContext(34, RoundingMode.UNNECESSARY); in testAbsMathContextNeg() 49 aNumber.abs(mc); in testAbsMathContextNeg() [all …]
|
D | MathContextTest.java | 26 MathContext mc = new MathContext("precision=1 roundingMode=" + rm); in testConstructor() local 27 assertEquals(1, mc.getPrecision()); in testConstructor() 28 assertEquals(rm, mc.getRoundingMode()); in testConstructor() 33 MathContext mc = new MathContext("precision=" + p + " roundingMode=" + RoundingMode.UP); in testConstructor() local 34 assertEquals(p, mc.getPrecision()); in testConstructor() 35 assertEquals(RoundingMode.UP, mc.getRoundingMode()); in testConstructor()
|
D | OldBigDecimalConvertTest.java | 146 MathContext mc = new MathContext(iPresition, RoundingMode.UP); in test_ByteValueExactNeg() local 147 BigDecimal bdNumber = new BigDecimal(sNumber, mc); in test_ByteValueExactNeg() 158 MathContext mc = new MathContext(iPresition, RoundingMode.HALF_DOWN); in test_ByteValueExactCharZero() local 159 BigDecimal bdNumber = new BigDecimal(cNumber, mc); in test_ByteValueExactCharZero() 168 MathContext mc = new MathContext(iPresition, RoundingMode.HALF_UP); in test_ByteValueExactStringZero() local 169 BigDecimal bdNumber = new BigDecimal(sNumber, mc); in test_ByteValueExactStringZero() 258 MathContext mc = new MathContext(iPresition, RoundingMode.UP); in test_ByteValueNeg() local 259 BigDecimal bdNumber = new BigDecimal(sNumber, mc); in test_ByteValueNeg() 270 MathContext mc = new MathContext(iPresition, RoundingMode.HALF_UP); in test_ByteValueCharZero() local 271 BigDecimal bdNumber = new BigDecimal(cNumber, mc); in test_ByteValueCharZero() [all …]
|
/libcore/luni/src/main/java/java/math/ |
D | BigDecimal.java | 373 public BigDecimal(char[] in, int offset, int len, MathContext mc) { in BigDecimal() argument 375 inplaceRound(mc); in BigDecimal() 411 public BigDecimal(char[] in, MathContext mc) { in BigDecimal() argument 413 inplaceRound(mc); in BigDecimal() 443 public BigDecimal(String val, MathContext mc) { in BigDecimal() argument 445 inplaceRound(mc); in BigDecimal() 537 public BigDecimal(double val, MathContext mc) { in BigDecimal() argument 539 inplaceRound(mc); in BigDecimal() 561 public BigDecimal(BigInteger val, MathContext mc) { in BigDecimal() argument 563 inplaceRound(mc); in BigDecimal() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigDecimalConstructorsTest.java | 103 MathContext mc = new MathContext(precision, rm); in testConstrBigIntegerMathContext() local 106 BigDecimal result = new BigDecimal(bA, mc); in testConstrBigIntegerMathContext() 120 MathContext mc = new MathContext(precision, rm); in testConstrBigIntegerScaleMathContext() local 123 BigDecimal result = new BigDecimal(bA, aScale, mc); in testConstrBigIntegerScaleMathContext() 177 MathContext mc = new MathContext(precision, rm); in testConstrCharIntIntMathContext() local 178 BigDecimal result = new BigDecimal(value, offset, len, mc); in testConstrCharIntIntMathContext() 201 MathContext mc = new MathContext(precision, rm); in testConstrCharIntIntMathContextException1() local 203 new BigDecimal(value, offset, len, mc); in testConstrCharIntIntMathContextException1() 218 MathContext mc = new MathContext(precision, rm); in testConstrCharIntIntMathContextException2() local 220 new BigDecimal(value, offset, len, mc); in testConstrCharIntIntMathContextException2() [all …]
|
D | BigDecimalArithmeticTest.java | 61 MathContext mc = new MathContext(5, RoundingMode.UP); in testAddMathContextEqualScalePosPos() local 62 BigDecimal result = aNumber.add(bNumber, mc); in testAddMathContextEqualScalePosPos() 96 MathContext mc = new MathContext(5, RoundingMode.FLOOR); in testAddMathContextEqualScaleNegNeg() local 97 BigDecimal result = aNumber.add(bNumber, mc); in testAddMathContextEqualScaleNegNeg() 131 MathContext mc = new MathContext(15, RoundingMode.CEILING); in testAddMathContextDiffScalePosNeg() local 132 BigDecimal result = aNumber.add(bNumber, mc); in testAddMathContextDiffScalePosNeg() 200 MathContext mc = new MathContext(15, RoundingMode.CEILING); in testSubtractMathContextEqualScalePosPos() local 201 BigDecimal result = aNumber.subtract(bNumber, mc); in testSubtractMathContextEqualScalePosPos() 253 MathContext mc = new MathContext(17, RoundingMode.DOWN); in testSubtractMathContextDiffScalePosNeg() local 254 BigDecimal result = aNumber.subtract(bNumber, mc); in testSubtractMathContextDiffScalePosNeg() [all …]
|
D | BigDecimalCompareTest.java | 64 MathContext mc = new MathContext(precision, rm); in testAbsMathContextNeg() local 67 BigDecimal res = aNumber.abs(mc); in testAbsMathContextNeg() 80 MathContext mc = new MathContext(precision, rm); in testAbsMathContextPos() local 83 BigDecimal res = aNumber.abs(mc); in testAbsMathContextPos() 375 MathContext mc = new MathContext(precision, rm); in testPlusMathContextPositive() local 379 BigDecimal res = aNumber.plus(mc); in testPlusMathContextPositive() 405 MathContext mc = new MathContext(precision, rm); in testPlusMathContextNegative() local 409 BigDecimal res = aNumber.plus(mc); in testPlusMathContextNegative() 435 MathContext mc = new MathContext(precision, rm); in testNegateMathContextPositive() local 439 BigDecimal res = aNumber.negate(mc); in testNegateMathContextPositive() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | LinkedHashMap.java | 590 int mc = modCount; in forEach() local 592 for (LinkedHashMapEntry<K,V> e = head; (e != null && modCount == mc); e = e.after) in forEach() 594 if (modCount != mc) in forEach() 640 int mc = modCount; in forEach() local 642 for (LinkedHashMapEntry<K,V> e = head; (e != null && modCount == mc); e = e.after) in forEach() 644 if (modCount != mc) in forEach() 704 int mc = modCount; in forEach() local 706 for (LinkedHashMapEntry<K,V> e = head; (e != null && mc == modCount); e = e.after) in forEach() 708 if (modCount != mc) in forEach() 718 int mc = modCount; in forEach() local [all …]
|
D | TreeSet.java | 306 Comparator<? super E> mc = map.comparator(); in addAll() local 307 if (cc==mc || (cc != null && cc.equals(mc))) { in addAll()
|
D | WeakHashMap.java | 1113 int i, hi, mc; in forEachRemaining() local 1119 mc = expectedModCount = m.modCount; in forEachRemaining() 1123 mc = expectedModCount; in forEachRemaining() 1142 if (m.modCount != mc) in forEachRemaining() 1193 int i, hi, mc; in forEachRemaining() local 1199 mc = expectedModCount = m.modCount; in forEachRemaining() 1203 mc = expectedModCount; in forEachRemaining() 1220 if (m.modCount != mc) in forEachRemaining() 1271 int i, hi, mc; in forEachRemaining() local 1277 mc = expectedModCount = m.modCount; in forEachRemaining() [all …]
|
D | HashMap.java | 929 int mc = modCount; in forEach() local 931 for (int i = 0; (i < tab.length && modCount == mc); ++i) { in forEach() 935 if (modCount != mc) in forEach() 978 int mc = modCount; in forEach() local 980 for (int i = 0; (i < tab.length && modCount == mc); ++i) { in forEach() 984 if (modCount != mc) in forEach() 1042 int mc = modCount; in forEach() local 1044 for (int i = 0; (i < tab.length && modCount == mc); ++i) { in forEach() 1048 if (modCount != mc) in forEach() 1288 int mc = modCount; in forEach() local [all …]
|
D | PriorityQueue.java | 856 int i, hi, mc; // hoist accesses and checks from loop in forEachRemaining() local 862 mc = q.modCount; in forEachRemaining() 866 mc = expectedModCount; in forEachRemaining() 874 else if (q.modCount != mc) in forEachRemaining()
|
D | ArrayList.java | 1376 int i, hi, mc; // hoist accesses and checks from loop in forEachRemaining() local 1382 mc = lst.modCount; in forEachRemaining() 1386 mc = expectedModCount; in forEachRemaining() 1392 if (lst.modCount == mc) in forEachRemaining()
|
D | IdentityHashMap.java | 1434 int i, hi, mc; Object key; in forEachRemaining() local 1490 int i, hi, mc; in forEachRemaining() local 1549 int i, hi, mc; in forEachRemaining() local
|
D | Formatter.java | 3662 MathContext mc = new MathContext(compPrec); 3664 = new BigDecimal(value.unscaledValue(), scale, mc);
|
/libcore/luni/src/test/java/tests/java/sql/ |
D | StressTest.java | 229 int mc = conn.getMetaData().getMaxConnections(); in getConnectionNum() local 230 if (mc != 0) { in getConnectionNum() 231 if (num != mc) { in getConnectionNum() 232 System.err.println("Will be used no more than " + mc in getConnectionNum() 235 num = mc; in getConnectionNum()
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | CertificateFactory1Test.java | 428 MyCertificate mc = createMC(); in testCertificateFactory11() local 431 oos.writeObject(mc); in testCertificateFactory11() 538 MyCertPath mc = new MyCertPath(enc); in testCertificateFactory13() local 542 oos.writeObject(mc); in testCertificateFactory13()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | FormatterTest.java | 4202 MathContext mc = new MathContext(30); in test_ScientificNotation() local 4203 BigDecimal value = new BigDecimal(0.1, mc); in test_ScientificNotation()
|
D | ScannerTest.java | 517 MockCloseable mc = new MockCloseable(); in test_ioException() local 518 s = new Scanner(mc); in test_ioException()
|